Re:C++: The Most Important Complexities
by gpderetta on Thursday November 16, 2023 @04:19AM
(#38287322)
Exactly. I measured vector vs an efficient linear probing hash map very recently and the cutoff was single digit. Even against unordered_map or plain std::map the cutoff was surprisingly low (although in this case I would trust a synthetic benchmark significantly less).
[ Parent
| on HN ]
Re:C++: The Most Important Complexities
by Arelius on Thursday November 16, 2023 @11:16AM
(#38291396)
Sure, the point here is with all the specific context specific details, your most likely comparing apples versus oranges. So simple complexity analysis or a general rule without benchmarks and a good understanding of the system and how it interacts with your details is not going to solve your problem.