Developer Creates LoopSleuth To Detect Quadratic Complexity
On 2026-01-31, an engineer on the transformers project fixed a tokenizer conversion bug that reduced a conversion step from four minutes to about one second on very large vocabularies (100k+ tokens). They then built LoopSleuth, a Rust CLI using llama.cpp and local models (e.g., Qwen2.5-Coder 3B Q4) to scan roughly 3,000 Python functions and flag about 20 quadratic-pattern instances as linter-like warnings.
Key Points
- 1Fixed tokenizer conversion reduced runtime from ~4 minutes to ~1 second for 100k+ vocabularies
- 2Demonstrated common asymptotic trap: .index() in sort keys causes O(m·n) blow-up on large inputs
- 3Introduced LoopSleuth to locally detect quadratic patterns, enabling CI linting and pre-cloud filtering
Scoring Rationale
Practical, directly usable CLI tool from transformers engineers; impact limited to developer tooling rather than research breakthroughs.
Sources
Public references used for this report.
Practice with real Logistics & Shipping data
90 SQL & Python problems · 15 industry datasets
250 free problems · No credit card
See all Logistics & Shipping problems

