You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which I presume are cornerstones of what simdjson implementations object do...
You could certainly help C++ committee to make std::bitset a better class with your knowledge!
Here is my question for simdjson authors... Is it possible to use the best runtime simdjson implementation bitmap_decode() for general purpose?
std::bitset encapsulation is too tight for exposing the underneath bitmap... this kinda sucks as it will force to write a new bitset class... but that aside, using bitmap_decode() inside a bitset class could make it possible to return the equivalent results of calling bitset::any(), bitset::count() and have an efficient bit iteration with a single bitmap scan...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have stumbled into an interesting problem and with using simdjson fresh in my memory this made me connect the dots...
One major shortcoming of std::bitset. It does not have any iterators to iterate through its bit sets.
https://en.cppreference.com/w/cpp/utility/bitset
Then I did stumble into Daniel's excellent blog posts:
https://lemire.me/blog/2018/02/21/iterating-over-set-bits-quickly/
https://lemire.me/blog/2018/03/08/iterating-over-set-bits-quickly-simd-edition/
Which I presume are cornerstones of what simdjson implementations object do...
You could certainly help C++ committee to make std::bitset a better class with your knowledge!
Here is my question for simdjson authors... Is it possible to use the best runtime simdjson implementation bitmap_decode() for general purpose?
std::bitset encapsulation is too tight for exposing the underneath bitmap... this kinda sucks as it will force to write a new bitset class... but that aside, using bitmap_decode() inside a bitset class could make it possible to return the equivalent results of calling bitset::any(), bitset::count() and have an efficient bit iteration with a single bitmap scan...
Beta Was this translation helpful? Give feedback.
All reactions