between containers. The proof for this can be seen in my msvc results, which have worse hive insertion, erasure and post-erasure iteration performance for the 48-byte ("small struct") isolated benchmarks than hub, but are still faster than hub in the general use (unordered modification) tests, which also store 48-byte structs and perform insertion, erasure and iteration in the same container instance over time. Only at the highest insert/erase-to-iteration ratio (10% of container size inserted/erased per-iteration) does hub perform better. This is not an anomoly; the same pattern is visible in clang and gcc, where isolated benchmarks of insert/erase are slower in hive with post-erasure iteration only 1% faster than hub, but hive is still 8% faster for all the lower churn ratios in the unordered modification benchmarks.
* Insert is slower on average for hive under msvc except for large types, slower for clang except for large types, and slower for gcc except for large numbers of large types.
* Iteration is generally faster across compilers for hive, however it is slower for 64-bit types under clang and small structs under msvc, and there is variation based on the number of elements.
* Memory use of hub varies between 96% and 50% of the usage of hive (but only for current implementation obviously).
The main thing to take away from all this is do your own benchmarks for your own use-case. You can use the guidelines above, but results may be very different on, say, a snapdragon processor. Also as mentioned, not all scenarios suit visitation. Always good to see new variations and experiments coming out! :)
https://redd.it/1tmr7k2
@r_cpp
Post #25274
12