AI
parse_number() as a SQLite extension: C vs Rust
Publication: Simon Willison's Weblog
Author: Not available in collected metadata
Source published: 08/11/2026, 22:26:00 UTC
Briefing created: 08/11/2026, 22:43:11 UTC
Based on a feed excerpt; full article content has not been acquired. Source evidence retrieved 08/11/2026, 22:42:24 UTC.
Briefings
A researcher compared SQLite C and Rust implementations of a custom parse_number() function for parsing strings like '$1,234.56'. The Rust extension was significantly faster (41-47 ns per row vs 19-46 ns for C) due to the Rust equivalent of C's strtod being twice as fast. The Rust version was 298 KB while the C version was 14 KB. The project was converted into a research report in the simonw/research repository.
Key points
- Rust SQLite extensions are approximately twice as fast as C extensions for parsing numbers, with Rust versions showing 41-47 ns per row compared to 19-46 ns for C.
- The Rust implementation using rusqlite was 298 KB while the C implementation using sqlite-loadable-rs was 14 KB.
Context
The study investigates performance and code complexity differences between building a SQLite custom function in C versus Rust, specifically testing a parse_number() implementation for handling decimal strings.
Limitations
The evidence is limited to a single researcher's personal investigation and a single GitHub repository; no broader industry adoption data or comparative studies with other database systems are provided.
Generated by Bittrees-hosted qwen35-2b sha256:aaf42c8b7c3c on 08/11/2026, 22:43:11 UTC. Based on publisher-provided feed evidence; may not cover the full original article. Check the source for details.
View archived briefing on IPFS
bafybeibdykfpmpxpd6z4wlga6z2dpffgs4qg4qbn7yf2vbjq3tzrowivkm