dynamic_bitset icon indicating copy to clipboard operation
dynamic_bitset copied to clipboard

performance?

Open mlund opened this issue 4 years ago • 6 comments

The following is a comparison of different bitset implementations: https://cs.up.ac.za/cs/vpieterse/pub/PieterseEtAl_SAICSIT2010.pdf. It would be interesting to see a similar comparison with this library.

mlund avatar Jul 09 '19 15:07 mlund

Yes, I wanted to do some benchmarking to compare with at least std::vector<bool> and boost::dynamic_bitset, maybe using Catch2 benchmarking functionality as it is already a dependancy for the tests.

I am not home for the next ~10 days, but when I come back I will work on it. Thank you for the article, I think it will be useful to see how they benchmarked the different dynamic bitsets and maybe add some others I didn't know about like Qt:QBitArray.

pinam45 avatar Jul 11 '19 01:07 pinam45

I'm back but now I have a summer job so I have little free time left to work on this... I work on it when I can but it will take some time before it is completed.

pinam45 avatar Jul 22 '19 21:07 pinam45

Sounds great!

mlund avatar Jul 23 '19 08:07 mlund

I decided to use google/benchmark because I may need the csv/json format output later, to generate performance comparison graphs (maybe with some cool LaTeX magic).

I created a new repository for the benchmarks (pinam45/dynamic_bitset_benchmarks) because multiple bitsets will be benchmarked not only mine, also It will require the benchmarked bitsets as dependencies and I want to keep this repository quite lightweight in size and simple in CMake.

I already pushed the benchmarks CMake/.clang-format/... setup but currently I still do not have much free time to works on this.

pinam45 avatar Aug 11 '19 20:08 pinam45

There seems to be no to_ulong() method

CoderLouie avatar Aug 24 '19 01:08 CoderLouie

Yes, it will add an undefined behaviour (assert in debug) for bitsets longer than an unsigned long long but it is an useful function, I will add it when I can, probably next week.

pinam45 avatar Aug 24 '19 22:08 pinam45