Optimize OffsetRangeQuery
- 主要言語
- Rust
- スター
- 42
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The Query implementation for OffsetRangeQuery is currently obviously correct, but less than optimal.
```rust
fn containing(&self, mut offset: u64, index: &LeafIndex, res: &mut [bool]) {
let range = offset..offset + index.keys.count();
// shortcut test
if !&self.0.intersects(&range) {
res.clear();
} else {
for i in 0..(index.keys.len()).min(res.len()) {
if res[i] {
res[i] = self.0.contains(&offset);
}
offset += 1;
}
}
}
```
Obviously this can be done more efficiently than checking every single offset.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start at the Rust Query implementation for OffsetRangeQuery, especially containing and its LeafIndex input. Compare the current per-offset behavior with a more efficient implementation, then verify that results remain correct while the offset checks are reduced.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- performance
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100