Skip to content
AI IntelligenceNov 8, 2026Practical Tip
Article

Simon Willison prompted Claude chat (Opus 5.5) to explore building a SQLite parse_number() extension in C versus Rust…

…comparing performance, code complexity and resulting .so file size. The Rust extension was 321 KB (Rusqlite) and 298 KB (sqlite-loadable-rs) versus 14 KB for C, but the Rust version was faster because the Rust equivalent of C's strtod is reportedly twice as fast. A follow-up prompt asked for a custom C parsing function to catch up to or beat Rust, which the model did using Clinger's fast path.

AI-generated: summaries written by AI from the linked sources. How we use AI

AI-generatedSource: Simon Willison
01

Source Brief

Simon Willison prompted Claude chat (Opus 5.5) to explore building a SQLite parse_number() extension in C versus Rust, comparing performance, code complexity and resulting .so file size. The Rust extension was 321 KB (Rusqlite) and 298 KB (sqlite-loadable-rs) versus 14 KB for C, but the Rust version was faster because the Rust equivalent of C's strtod is reportedly twice as fast. A follow-up prompt asked for a custom C parsing function to catch up to or beat Rust, which the model did using Clinger's fast path.

02

Practical Tip

When comparing implementation approaches, ask the model to explore trade-offs across performance, code complexity and artifact size, then follow up with a targeted prompt to close a specific gap the first answer reveals.