3 ms·
> The graph is not going to tell us anything about that. Profiling will. What kind of profiling would you employ for a concurrent data structure like the hash
by exDM69 11y ago
> The graph is not going to tell us anything about that. Profiling will.
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.
- vardump 11y ago> ... Instrumented code or sampling profilers? 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.