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

Improve shift and benchmarking #49

Merged
merged 31 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
209fac7
Add dynamic_bitset and bitarray to benchmarks
bkille Aug 21, 2023
799d18f
Add fill benchmarks
bkille Aug 21, 2023
65ed782
Add libpopcnt
bkille Aug 21, 2023
c54833d
Use libpopcnt at all times
bkille Aug 21, 2023
9a4fada
Add count benhcmarks
bkille Aug 21, 2023
6b7cef9
Add SIMD
bkille Aug 22, 2023
3d8a003
Remove swp
bkille Aug 22, 2023
04af962
Add HWY* at top and bottom
bkille Aug 22, 2023
bdb64fe
Add more benchmarks
bkille Aug 22, 2023
cfd2d10
Add yet another cast...
bkille Aug 25, 2023
ba2be22
Add comments
bkille Aug 25, 2023
7f9a920
Add extra word of padding for left shift
bkille Aug 25, 2023
354c90a
Make bit_and constexpr for benchmarking
bkille Aug 26, 2023
65ea3ae
Add reverse benchmarks
bkille Dec 19, 2023
43b5b0e
Shift by non-word offset
bkille Dec 19, 2023
fb1a7fa
Adjust container sizes
bkille Dec 19, 2023
1797dff
Update benchmarks
bkille Dec 20, 2023
eb4234a
Revert to large
bkille Dec 20, 2023
775c0aa
Add GTest:: prefix to libs
bkille Apr 22, 2024
24b5789
Add profile option
bkille Apr 23, 2024
0db6aa9
Increase large
bkille Apr 23, 2024
60c7bb0
Do not fill when shifting
bkille Apr 23, 2024
f1e4c34
Working improved shift_left
bkille Apr 23, 2024
2e54ccf
Improved right shift. tests passing
bkille Jun 5, 2024
5ae65fe
Update benchmarks
bkille Jun 5, 2024
aa20478
Fix word_shift_right bug
bkille Jun 5, 2024
2e47baa
Fix repeat test
bkille Jun 5, 2024
69dc3e9
Minor shift changes
bkille Jun 5, 2024
986ab76
Rename header
bkille Jun 5, 2024
5b22949
Update contributors for bit-algorithms and bit-containers
bkille Jun 6, 2024
007d772
Update version
bkille Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "benchmark/ext/BitArray"]
path = benchmark/ext/BitArray
url = https://github.com/noporpoise/BitArray.git
[submodule "benchmark/ext/itsy_bitsy"]
path = benchmark/ext/itsy_bitsy
url = https://github.com/ThePhD/itsy_bitsy.git
[submodule "benchmark/ext/dynamic_bitset"]
path = benchmark/ext/dynamic_bitset
url = https://github.com/pinam45/dynamic_bitset.git
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.14)

# set the project name
project(Bit-Vector VERSION 0.1.1)
project(Bit-Vector VERSION 0.3.0)

# set output directory of builds
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down Expand Up @@ -46,6 +46,7 @@ option(BITLIB_HWY "Build with google highway SIMD extensions" OFF)
option(BITLIB_BENCHMARK "Build bitlib benchmarks" OFF)
option(BITLIB_EXAMPLE "Build bitlib examples" OFF)
option(BITLIB_TEST "Build bitlib tests" OFF)
option(BITLIB_PROFILE "Buid simple example for profiling" OFF)
option(BITLIB_COVERAGE "Compute test coverage" OFF)

if (BITLIB_HWY)
Expand All @@ -64,3 +65,7 @@ if(BITLIB_TEST)
add_subdirectory(test)
endif()

if(BITLIB_PROFILE)
add_subdirectory(profile)
endif()

184 changes: 109 additions & 75 deletions README.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ set(CMAKE_BUILD_TYPE Release)
file(GLOB BENCH_SOURCES "src/*.cc")
add_executable(bitlib-bench ${BENCH_SOURCES})

add_subdirectory(ext/dynamic_bitset)

# specify benchmark-specific libraries
include_directories(${googlebench_SOURCE_DIR}/benchmark/include src/utils)
target_link_libraries(bitlib-bench PRIVATE benchmark::benchmark -pthread)
include_directories(
${googlebench_SOURCE_DIR}/benchmark/include
src/utils
ext/BitArray
ext/itsy_bitsy/include)
target_link_libraries(bitlib-bench PRIVATE benchmark::benchmark -pthread ${CMAKE_CURRENT_LIST_DIR}/ext/BitArray/libbitarr.a sul::dynamic_bitset)

target_compile_options(bitlib-bench PUBLIC -O3 -DNDEBUG -march=native -Wpedantic)
install(TARGETS bitlib-bench DESTINATION .)
Loading
Loading