Const-me/CollectionMicrobench
View on GitHub ↗ ★ 9 C++
Some C++ collections micromenchmark for vectors and lists.
12 mentions on Hacker News by 1 person: 1 story, 11 comments · first 2016-08-23 · latest 2023-09-27
20082026
-
Here’s a simple non-standard allocator for C++ I used a few times in the past: https://github.com/Const-me/CollectionMicrobench/blob/master... The block size is controlled with a template argument, the number must be a compile-time…
comment by Const-me · 2023-09-27 · in Arena allocator tips and tricks -
In some cases, the performance of std::unordered_map is fixable with a custom allocator: https://github.com/Const-me/CollectionMicrobench
comment by Const-me · 2019-07-29 · in Comparisons in C++20 -
…linked list implementation (not mine, `CAtlList` from ATL) approaches or outperforms std::vector: https://github.com/Const-me/CollectionMicrobench Fortunately, in C++ we don’t pay for features we don’t use. If you want fast code, no need…
comment by Const-me · 2019-01-18 · in Is C++ fast? -
…OK but just too slow. For example, I avoid using standard collections except strings and vectors: https://github.com/Const-me/CollectionMicrobench > to limit yourself to all the things that are basically available in C. C++ has a problem,…
comment by Const-me · 2018-12-24 · in I disagree with Linus Torvalds about C++ (2009) -
…you’ll only call malloc/free once per graph, not once per item. Look at the data in my repository: https://github.com/Const-me/CollectionMicrobench As you see, adding my custom allocator to these standard C++ collections improved…
comment by Const-me · 2018-10-11 · in Rust has a static “garbage collector” -
On Windows, STL is often too slow: https://github.com/Const-me/CollectionMicrobench/
comment by Const-me · 2018-05-03 · in Over 30? Too Old for Tech Jobs in China -
…For this case it’s essentially a random index. Besides, unordered_map memory locality is fixable: https://github.com/Const-me/CollectionMicrobench
comment by Const-me · 2018-04-01 · in Show HN: Moustique – C++14 coroutine-based non-blocking IO on Linux -
…lines of code, and plug it into any collection for non-trivial performance gain in some use cases: https://github.com/Const-me/CollectionMicrobench Another C++ feature helping me with these performance-critical calculations is OpenMP. Of…
comment by Const-me · 2018-02-25 · in Why writing a linked list in safe Rust is so damned hard -
…one), e.g. 2-16MB RAM / each. If I need to erase elements, I include a free list such as this one: https://github.com/Const-me/CollectionMicrobench/blob/master... But the exact container is not that important here. If you don’t have that…
comment by Const-me · 2017-09-06 · in Some Were Meant for C: The Endurance of an Unmanageable Language [pdf] -
…arrays, making assertions about locality is hard. It depends on the libraries you use. Take a look: https://github.com/Const-me/CollectionMicrobench As you see, in practice, a good linked list is same or slightly faster than std::vector.…
comment by Const-me · 2017-07-31 · in RAM Is the New Disk -
Ported to C++, added two ATL collections, also added 100M elements data point: https://github.com/Const-me/CollectionMicrobench Arrays are still generally faster than lists. The funny thing is Microsoft’s linked lists are faster than C++…
comment by Const-me · 2016-08-23 · in When Big O Fools You