Show HN: flashjson github.com · 2 points · 0 comments · HN thread TL;DR flashjso...
Show HN @show
Show HN: flashjson github.com · 2 points · 0 comments · HN thread
TL;DR flashjson is a from-scratch JSON parser for CPython 3.14 with a C extension fast path and a pure-Python fallback that needs no compiler. The author reports benchmarks against stdlib json and orjson 3.13.0, with flashjson faster than orjson on 6 of 7 synthetic datasets. The Show HN post has 2 points and no comments yet.
- Drop-in replacement for json.loads with the same keywords (parse_float, parse_int, parse_constant, object_hook, object_pairs_hook) and stdlib JSONDecodeError messages.
- C extension uses SIMD byte scanning, SIMD UTF-8 transcoding via vendored simdutf, string and key caches, and Eisel-Lemire float parsing; a pure-Python backend is used when no compiler is available.
- Reported speed: up to 5.1x stdlib json; faster than orjson on 6 of 7 datasets, with the compact key-dense 1 MB traffic case at 0.95x orjson.
- Wheels for CPython 3.14 on linux x86_64/aarch64, macOS arm64/x86_64 and Windows AMD64; builds have optional NATIVE=1 and PGO=1 modes.
- Limitations: built and tested only on CPython 3.14 or newer, caches are not thread-safe so free-threaded builds need one thread per process, and it depends on the non-public symbol _PyDict_NewPresized.
- Licensed Apache 2.0, with third-party code from simdjson and simdutf and provenance recorded in NOTICE.
Discussion The thread has no comments yet, so there is no community discussion to summarise. The post has only 2 points at the time of this digest.