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
{{ message }}
Repository navigation
Commit f3a2a9f
Browse filesBrowse the repository at this point in the historyBrowse files
Add window_to_ids exact-lookup index to MutableEpoch: O(M) → O(m)
MutableEpoch now maintains a secondary index:
window_to_ids: HashMap<TimestampRange, Vec<(MetricID, Arc<Agg>)>>
On insert: Arc::clone into window_to_ids (refcount bump only, no data copy)
+ Vec::push — O(1) amortized, no change to insert complexity.
exact_query: HashMap lookup O(1) + iterate m entries O(m), no raw scan.
Previously O(M) linear scan of all raw entries.
range_query_into: unchanged linear scan of raw (O(M), bounded).
seal(): unchanged — window_to_ids dropped, raw is sorted in-place.
remove_windows: also removes from window_to_ids.
Memory: one extra Arc pointer (8 bytes) per inserted entry — cheap.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments