Expand description
Improved iteration over factorized data.
This module provides cache-friendly iteration over FactorizedChunk data
using pre-computed indices for better performance on multi-hop traversals.
§Performance
The original FactorizedRowIterator computes ranges on-the-fly, which can
be cache-unfriendly for deep traversals. This improved iterator:
- Pre-computes all indices before iteration starts
- Uses SmallVec for stack allocation when level count is small
- Provides
RowViewfor zero-copy value access
§Example
ⓘ
let chunk = get_factorized_chunk();
// Pre-computed iteration (better for repeated access)
let iter = PrecomputedIter::new(&chunk);
for row in iter {
let source_id = row.get_node_id(0, 0);
let dest_id = row.get_node_id(1, 0);
// ... process row
}Structs§
- Precomputed
Iter - Pre-computed iterator over logical rows in a factorized chunk.
- RowIndices
- Pre-computed indices for a single logical row.
- RowView
- A view into a single logical row of a factorized chunk.
- Streaming
Iter - Streaming iterator that doesn’t pre-compute indices.