Comments (5)
Can't you use roaring_uint32_iterator_previous
?
from croaring.
Can't you use
roaring_uint32_iterator_previous
?
I donβt think it can perform well given there are a large number of bits between the end of the range to search and the last value in the roaring bitmap. My assumption is by using that function, the implementation needs to iterates backwards from the last value.
from croaring.
I'd recommend making a benchmark showing an unreasonable performance loss.
Keep in mind that Roaring bitmaps are compressed bitmaps, going back to the previous set bit will never have to do much work. For instance, in:
roaring_bitmap_t *r = roaring_bitmap_from(1, UINT32_MAX);
roaring_uint32_iterator_t it;
roaring_iterator_init(r, &it);
roaring_uint32_iterator_move_equalorlarger(&it, 2); // Iterator points at UINT32_MAX
roaring_uint32_iterator_previous(&it); // Iterator points at 1
both roaring_uint32_iterator_move_equalorlarger
and roaring_uint32_iterator_previous
will be very quick, as the iterator is able to skip directly between the two values.
from croaring.
This being said, if you want to implement the desired functionality, a pull request would be given full consideration. It could lead to more elegant code.
from croaring.
Thank you all. The proposed flow of euqlorlarger then going back to find the value should perform well. I'm closing the issue as a result.
from croaring.
Related Issues (20)
- Wrong result for roaring64_bitmap_contains_range HOT 1
- Roaring64 iterator cannot come back from the edge
- Roaring64 iterator's move_equalorlarger can only go forward
- Copying a Roaring64MapSetBitForwardIterator into an iterator from another map does not work HOT 1
- Feature request: intersection, union, and difference with the tail of another bitmap HOT 4
- Segfault with roaring64_bitmap_flip_inplace HOT 4
- roaring64_iterator_move_equalorlarger cannot come back from the end
- How to use `containsRange` in roaring64 HOT 1
- Improve lazyor in CRoaring HOT 1
- Compiling croaring as C++ fails on Windows
- No github release/tag for 3.0.0 HOT 1
- Compilation issues with oldest clang versions with 3.0.0 HOT 1
- Allow allocating container in memory pool HOT 6
- Implement roaring64_bitmap_statistics HOT 10
- Avoid calculating the sum of items in bitmap statistics HOT 3
- Roaring - OR Operation - High memory usage in Oracle Linux 8(OEL8) when compared to Oracle Linux 7 (OEL7) HOT 7
- access the nullptr in function "run_container_is_full" HOT 5
- Rewrite the C++ Roaring64Map implementation to use 64-bit croaring HOT 4
- Roaring64 doesn't handle out of memory HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from croaring.