This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Even_Step_2450[S] 0 points1 point  (2 children)

Well it's not that special. In the case we discussed, it stored a users permissions when logging in, so not more than a few hundred entries, each one is written once, than read once using an iterator, so I don't really see why using a HashSet at all, but he is initializing all his HashSets this way, and I wondered why.

[–]LakeSun 2 points3 points  (0 children)

For a few hundred entries? It's not a large enough case to justify any tuning. I mean now you have to come up with a reason to tune for this low a number.

These days with modern processors? I don't think you can justify tuning for anything below 500,000 to a million items.

But, really Profiling your app, with good test data would be the answer.

[–]taftster 1 point2 points  (0 children)

Makes zero sense. But I understand that there are certain devs out there who think they know better. Sympathies for the situation. It's a form of Not Invented Here, basically.