Before one can say anything either way, one needs to profile. Assumptions rarely work when it comes to extracting high runtime performance.
So unless you did profile, your comment didn't really add anything.
The previous comment explained why and how the author's analysis is flawed. Then it goes over top by speculating exactly into the opposite direction. But that doesn't reduce the quality of the first part of the comment. That part was still valuable to me.
Original author's analysis is flawed, it doesn't extend to multi-socket systems.
What we don't know is how thing scales beyond a single socket. The graph is not going to tell us anything about that. Profiling will.
Experience has shown to me assumptions are bad.
So now I don't assume a certain call will succeed or even work the way I think it does. Instead I check return value of every call and test it against my assumptions.
I never assume much about performance either. I might occasionally use microbenchmarks as a hint. But the main mode of operation is measuring as big of a piece of functionality as possible. Many different size, but realistic, workloads. Preferably on multiple different systems as well.
If performance is the goal, I'd advocate one trying out different concurrent hash map implementations in the system one is building.
Never assume.
What kind of profiling would you employ for a concurrent data structure like the hash map here? Instrumented code or sampling profilers?
I'm afraid both kinds of profiling would yield quite meaningless information, because the individual operations are quite fast and the runtime may vary depending on e.g. cache utilization and contention. Profiling is good for bigger applications but it's not super useful for "primitive" operations like hash map inserts.
If I were to optimize something like this, I'd first reach for the CPU performance counters trying to understand what aspect is the bottle neck.
A sampling profiler would be helpful. Although most hash map related samples would likely fall on atomic ops it presumably uses for synchronization. On the other hand, you'd know whether you need to optimize this in the first place.
Instrumented profiler would yield garbage data for a lot of reasons, I wouldn't use that, except maybe over a large group of hash map operations.
> ... I'd first reach for the CPU performance counters
I count CPU performance counters as profiling.
Either way, Junction is BSD-licensed while TBB is GPL/$, so I hope it'll find a use somewhere.
Intel TBB scales proportionally, which is precisely what you'd want here. Junction starts to flatten out on 6th CPU, which implies that it has fundamental design issues that crop up at higher CPU counts. Chances are that its performance not only won't scale further, but will actually drop further down the graph.
On other hand TBB code can be put throught some routine code optimization (hand-coded assembly and such) to increase its performance without affecting its linear graph shape.