3 ms·
Really interesting, I love new ideas for data structures. One little note about benchmarking though. It's hard to get good benchmark data, particularly in Jav
by MattPalmer1086 2y ago
Really interesting, I love new ideas for data structures.
One little note about benchmarking though. It's hard to get good benchmark data, particularly in Java due to the JIT compiler. At the very least, you should perform a large number of warmups (e.g. 10000 calls to the code) before actually benchmarking to ensure all code is fully compiled by the JIT. That's only one of the gotchas though. Even better, use a dedicated Java benchmarking system like jmh.
- gpderetta 2y agoThere is no JIT in a typical C++ implementation. The first run might be an outlier due to warming up multiple caches, but it can be obviated with a large enough run. Runtime should be relatively stable for synthetic benchmarks.
- MattPalmer1086 2y agoThere is a Java implementation as well with benchmarks. But yes, C++ has no JIT, although doing some warm up is also advised for benchmarking in general.