erigontech / erigontech/erigon

Explore `sequence.Ranges()` iterator api

Open
#21,055 1 comment 0 reactions 0 assignees View on GitHub
ErigonDB
Dominant language
Go
Stars
3.6k
Forks
1.5k
Avg merge
1d 16h
Merged PRs (30d)
455

Description

Found interesting sequence iterator API
```
// [start, end)
for start, end := bitmap.Ranges() {
eliasFano.AddRange(start, end)
}
```
Here: https://github.com/RoaringBitmap/roaring/pull/522/changes#diff-975f81a675e3c63d3c0caa18e03f164c870c3facb571da48b057699dc540c87fR510

I see next applications: EliasFano, sequence merges, `tx.IndexRange()`
Theoretically it can greatly improve batch-processing of sequences.

But what else? Maybe even history api may look like `value, startTxNum, endTxNum := history.Ranges(key)`

Such API is `streaming-over-network-friendly`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.