{
  "id": 19034549,
  "title": "parse_number() as a SQLite extension: C vs Rust",
  "url": "https://urgent.news/2026/11/08/parse-number-as-a-sqlite-extension-c-vs-rust",
  "topic": "culture",
  "section": "Culture",
  "published": "2026-11-08T22:26:00.000Z",
  "source": {
    "name": "Simon Willison",
    "slug": "simon-willison",
    "url": "https://simonwillison.net/2026/Nov/8/sqlite-parse-number-c-vs-rust/"
  },
  "original_language": "en",
  "account": "A reporter set out to investigate the ease of creating a SQLite extension that includes a function for parsing strings into numeric values, such as -$1,234.56 or 12.5%. The reporter used Claude chat (Opus 5.5) to prompt the idea of a custom function named parse_number(value) that would strip out characters like commas, currency symbols, and percentages, as well as handle negative signs. The reporter was curious to compare the performance of building this extension in C versus Rust, as well as the complexity and size of the resulting .so file.\n\nThe results showed that the Rust implementation was significantly faster, with the Rust extension being 321 KB (using Rusqlite) and 298 KB (using sqlite-loadable-rs), while the C extension was only 14 KB. This performance difference was attributed to the Rust equivalent of C's strtod being twice as fast. The reporter then proceeded to write their own C function to see if it could match or surpass the Rust implementation when parsing text into decimal numbers. The net cost per row when processing 2 million rows was compared, with the lower cost being preferred. Finally, the reporter aimed to turn their investigation into a research report, following the format used in the simonw/research repository.",
  "summary": "Research: parse_number() as a SQLite extension: C vs Rust I was out walking the dog when I got curious about how easy/difficult it would be to write a SQLite C extension that adds a parse_number() function for turning strings like -$1,234.56 or '12.5%' into numeric values that could be summed and sorted. I fired up regular Claude chat (Opus 5.5) and prompted : I'm thinking about a SQLite custom…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}