Skip to main content

max / makenotwork

tagtree: soften optimistic suggest() latency docstring Name the tier-2 segment-fallback cost honestly (full O(tags*segments) scan, tens of microseconds at low thousands) instead of claiming every suggest call finishes in single-digit microseconds. Deepaudit 07-20 NOTE. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-24 19:26 UTC
Commit: b9c8d7ba3dc6ec1191d5875dd80534fcb667ecb2
Parent: fe095ea
1 file changed, +4 insertions, -2 deletions
@@ -702,8 +702,10 @@ pub fn batch_rename(operations: &[(&str, &str)], index: &mut TagIndex) -> usize
702 702 ///
703 703 /// Backed by a sorted `Vec<String>`: binary search for path-prefix matching
704 704 /// (O(log n) to find the start, then linear scan for results), with a segment-prefix
705 - /// fallback for mid-tag matches. At typical corpus sizes (hundreds to low thousands
706 - /// of tags), the entire `suggest` call completes in single-digit microseconds.
705 + /// fallback for mid-tag matches. A path-prefix keystroke at typical corpus sizes
706 + /// (hundreds to low thousands of tags) completes in single-digit microseconds; a
707 + /// keystroke that falls through to the segment fallback pays a full O(tags * segments)
708 + /// scan, into the tens of microseconds at low thousands.
707 709 ///
708 710 /// ```
709 711 /// use tagtree::TagIndex;