Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More reasonable and accurate benchmarks #460

Merged
merged 12 commits into from
Apr 1, 2023
Merged

More reasonable and accurate benchmarks #460

merged 12 commits into from
Apr 1, 2023

Conversation

lemire
Copy link
Member

@lemire lemire commented Apr 1, 2023

Currently, the CRoaring project does not have, by itself, sensible microbenchmarks. This PR will fix that.

(The 'benchmarks' directory is filled with ad hoc benchmarks that may have their uses.)

Running microbenchmarks

We have microbenchmarks constructed with the Google Benchmarks.
Under Linux or macOS, you may run them as follows:

cmake --build build
./build/microbenchmarks/bench

By default, the benchmark tools picks one data set (e.g., CRoaring/benchmarks/realdata/census1881).
We have several data sets and you may pick others:

./build/microbenchmarks/bench benchmarks/realdata/wikileaks-noquotes 

You may disable some functionality for the purpose of benchmarking. For example, you could
benchmark the code without AVX-512 even if both your processor and compiler supports it:

cmake -B buildnoavx512  -D ROARING_DISABLE_AVX512=ON
cmake --build buildnoavx512
./buildnoavx512/microbenchmarks/bench

@lemire lemire merged commit 0eafc44 into master Apr 1, 2023
@huihan365
Copy link
Contributor

Glad to see we have more accurate benchmark. I will use it.

@lemire
Copy link
Member Author

lemire commented Apr 12, 2023

@huihan365 We are often bound by array containers. Use perf record/perf report to identify the bottlenecks: you can require the benchmark to focus on on operation with --benchmark_filter=.....

Now that we have the foundation for AVX-512, we should be able to really optimize it well.

@huihan365
Copy link
Contributor

Got it, i will work on it when i finish my work on-hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants