map_benchmark
benchmark
map_benchmark | benchmark | |
---|---|---|
5 | 19 | |
287 | 8,450 | |
- | 1.5% | |
5.5 | 8.7 | |
about 1 year ago | 6 days ago | |
C++ | C++ | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
map_benchmark
-
Optimizing Open Addressing
I tied adding the maps to the [1] benchmark, but I wasn't able to, since they aren't type generic yet. You may want to benchmark against [2], and [3] which are the best performing ones in the above benchmark.
[1] https://github.com/martinus/map_benchmark/
[2] https://github.com/TheNumbat/hashtables/blob/main/code/robin...
[3] https://github.com/ktprime/ktprime
-
Benchmarking my data structure
In any case, I guess you can find some inspiration in this comparison of maps which was posted to /r/cpp a couple of months ago: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/ (source code for the benchmark seems to be on https://github.com/martinus/map_benchmark ). It's made for maps but adjusting most benchmarks for other containers should be fairly straightforward.
-
Is there a committee paper on a "simplified" random interface?
There is no such thing as best random generator. They have so many different properties, e.g. is it cryptographic secure, how large is the state, how fast on x86 architecture, can it jump forward, etc. My go-to generator is sfc64 because it's fast, simple, and seems to produce high quality random numbers. Here is one implementation: https://github.com/martinus/map_benchmark/blob/master/src/app/sfc64.h other popular generators are PCG and xorshift
-
boost::unordered map is a new king of data structures
I've implemented this PoolAllocator which does exactly this: https://github.com/martinus/map_benchmark/blob/master/src/app/pool.h
-
Development Plan for Boost.Unordered
Hi Martin, thanks for the pointer! BTW, I think we may use your impressive benchmark suite to test our advances once we come up with something worth deep testing.
benchmark
- How can I check the execution time of a program rendered in SFML?
- How to Perf profile functions?
-
how do you properly benchmark?
I'm aware of one by Google that I used a couple times, but IMO it's better to capture real runtime data from a fully-operational process than to carve out the benchmarkable bits and test them in isolation, so I track information during program testing and print it all to a log instead of using things like that.
-
Benchmarking my data structure
If you just want to do some quick benchmarks, you can just use std::chrono::high_resolution_clock::now(). Call it before the code that you are benchmarking and then immediately after. Take them away and you have your duration. If you want to use a proper benchmarking tool then I can totally recommend Google Benchmark. Fantastic benchmarking tool. Honourable mention would be Quick Bench which is an online tool that uses Google Benchmark.
-
Google benchmark : No rule to make Target***
I tried to install google benchmark(https://github.com/google/benchmark) in my ubuntu machine by :
- Best accurate way to measure/compare elapsed time in C++
-
Don’t Be Scared Of Functional Programming
We don't know if it's a lie until we verify it and that's not difficult, you have a quicksort implementation in a couple of languages, you'll need to pass the necessary parameters to show the time needed by a function call to execute to the compiler or interpreter or you may use use a library(like benchmark for C++) and you're good to go.
-
How to identify inefficient method calls?
If you are uncertain about the performance characteristics of a function you should ALWAYS benchmark it. Googles Benchmark library is wonderful for quick micro benchmarks. For more complex things, perhaps look into profiling and then look at invocation counts of copy constructors.
-
Is there any fast allocator in std lib / boost for fixed size objects (not at compile time) but has deallocation methods?
Your compiler may be optimising away your loop, there. I typically use a micro-benchmarking tool for these types of tests. You could try Google Benchmark. It’s available in most OS’ package managers, but pretty easy to build from source if not
-
Calculate Your Code Performance
C++: C++ has quite a number of benchmarking libraries some of the recent ones involving C++ 20's flexibility. The most notable being Google Bench and UT. C does not have many specific benchmarking libraries, but you can easily integrate C code with C++ benchmarking libraries in order to test the performance of your C code.
What are some alternatives?
robin-map - C++ implementation of a fast hash map and hash set using robin hood hashing
Catch - A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
unordered_dense - A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion
Google Test - GoogleTest - Google Testing and Mocking Framework
Hopscotch map - C++ implementation of a fast hash map and hash set using hopscotch hashing
Celero - C++ Benchmark Authoring Library/Framework
unordered - Boost.org unordered module
hayai - C++ benchmarking framework
parallel-hashmap - A family of header-only, very fast and memory-friendly hashmap and btree containers.
Nonius - A C++ micro-benchmarking framework
robin-hood-hashing - Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
easy_profiler - Lightweight profiler library for c++