parse_number() as a SQLite extension: C vs Rust
The point
Simon Willison tested parse_number(), a SQLite function that turns strings like -$1,234.56 or 12.5% into numbers that can be summed and sorted. Four C and Rust implementations covered the same parsing rules and floating point accuracy.
Why it matters
For builders, messy numeric strings can be cleaned inside SQLite queries.
Key details
- Optimized C ran 16 to 19 ns per row, about twice as fast as the Rust versions
- All versions matched across 8 million fuzz checks, and the C file was 14 KB versus 298 KB and 321 KB for Rust
Original ~3 min → 25 sec here Source: Simon Willison, Nov 8, 2026