-
Notifications
You must be signed in to change notification settings - Fork 1
New benchmarks and tests #10
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ac3349a
Rank/Select Benchmarks with 10/90% fill
mperikov c0eef4b
Benchmark fix
mperikov a02044e
Address Sanitizer flag, Disable AVX512 flag, messages
mperikov 506a93f
Becnhmarks iterations count
mperikov 9cf0c43
Rank512 test fix
mperikov e4e89ff
Benchmarks tests
mperikov 816e330
Changes detected using the address sanitizer
mperikov 4069619
Merge remote-tracking branch 'origin/main' into benchmarks-10-90-fill
mperikov 96c4629
CI fix
mperikov a5fd362
aligning bits span to the size of the basic block
mperikov 6b0a0ab
revert last commit
mperikov bcb1143
BitVector Basic test fix
mperikov 05b7a7d
CI with SDE fix
mperikov ed25418
Clang format
mperikov eff4f59
aligning arrays to the size of the basic block int tests
mperikov c4ca136
refactoring
mperikov 7de5bba
CI for benchmark_tests
mperikov 6f13a91
CI fix
mperikov 3174070
Temporary CI fix
mperikov 7ad7b67
Benchmark fix (the array size must be a multiple of 8)
mperikov 06b4d3f
CI 'on' fix
mperikov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: CMake Build and Run Benchmark Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Create Build Directory | ||
| run: mkdir build | ||
|
|
||
| - name: Configure CMake | ||
| working-directory: ./build | ||
| run: cmake -DDISABLE_AVX512=ON -DENABLE_ADDRESS_SANITIZER=ON .. | ||
|
|
||
| - name: Build Project | ||
| working-directory: ./build | ||
| run: make -j | ||
|
|
||
| - name: Run Benchmark Tests | ||
| working-directory: ./build | ||
| run: ./benchmark_tests | ||
|
|
||
| build-and-test-with-SDE: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Create Build Directory | ||
| run: mkdir build | ||
|
|
||
| - name: Download and Unpack SDE | ||
| working-directory: ./build | ||
| run: | | ||
| wget https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz | ||
| tar xf sde-external-9.58.0-2025-06-16-lin.tar.xz | ||
|
|
||
| - name: Configure CMake | ||
| working-directory: ./build | ||
| run: cmake -DENABLE_ADDRESS_SANITIZER=ON -DMARCH=icelake-client -DHAVE_STD_REGEX=ON .. | ||
|
|
||
| - name: Build Project | ||
| working-directory: ./build | ||
| run: make -j | ||
|
|
||
| - name: Run Benchmark Tests | ||
| working-directory: ./build | ||
| run: sde-external-9.58.0-2025-06-16-lin/sde64 -icl -emu-xinuse 0 -- ./benchmark_tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| #include <gtest/gtest.h> | ||
|
|
||
| #include <numeric> | ||
| #include <random> | ||
|
|
||
| #include "bits.h" | ||
| #include "bitvector.h" | ||
|
|
||
| using pixie::BitVector; | ||
| using pixie::BitVectorInterleaved; | ||
|
|
||
| TEST(BitVectorBenchmarkTest, SelectNonInterleaved10PercentFill) { | ||
| for (size_t n = 4; n <= (1ull << 34); n <<= 2) { | ||
| std::mt19937_64 rng(42); | ||
|
|
||
| std::vector<uint64_t> bits(((8 + n / 64) / 8) * 8); | ||
| size_t num_ones = n * 0.1; | ||
| for (int i = 0; i < num_ones; i++) { | ||
| uint64_t pos = rng() % n; | ||
| bits[pos / 64] |= (1ULL << pos % 64); | ||
| } | ||
|
|
||
| pixie::BitVector bv(bits, n); | ||
|
|
||
| auto max_rank = bv.rank(bv.size()) + 1; | ||
| for (int i = 0; i < 100000; i++) { | ||
| uint64_t rank = rng() % max_rank; | ||
| bv.select(rank); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| TEST(BitVectorBenchmarkTest, SelectNonInterleaved90PercentFill) { | ||
| for (size_t n = 4; n <= (1ull << 34); n <<= 2) { | ||
| std::mt19937_64 rng(42); | ||
|
|
||
| std::vector<uint64_t> bits(((8 + n / 64) / 8) * 8); | ||
| size_t num_ones = n * 0.9; | ||
| for (int i = 0; i < num_ones; i++) { | ||
| uint64_t pos = rng() % n; | ||
| bits[pos / 64] |= (1ULL << pos % 64); | ||
| } | ||
|
|
||
| pixie::BitVector bv(bits, n); | ||
|
|
||
| auto max_rank = bv.rank(bv.size()) + 1; | ||
| for (int i = 0; i < 100000; i++) { | ||
| uint64_t rank = rng() % max_rank; | ||
| bv.select(rank); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| TEST(BitVectorBenchmarkTest, SelectNonInterleaved) { | ||
| for (size_t n = 4; n <= (1ull << 34); n <<= 2) { | ||
| std::mt19937_64 rng(42); | ||
|
|
||
| std::vector<uint64_t> bits(((8 + n / 64) / 8) * 8); | ||
| for (auto& x : bits) { | ||
| x = rng(); | ||
| } | ||
| pixie::BitVector bv(bits, n); | ||
|
|
||
| auto max_rank = bv.rank(bv.size()) + 1; | ||
|
|
||
| for (int i = 0; i < 100000; i++) { | ||
| uint64_t rank = rng() % max_rank; | ||
| bv.select(rank); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.