All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

RX: Embedded Data Store for JSON with In-Place Querying and Automatic Deduplication

By

creationix

2mo ago· 6 min readenCode

Summary

RX is an embedded data store for JSON-shaped data that enables querying encoded documents in place without parsing. It functions as a 'no-SQL SQLite' with automatic pointer deduplication and direct buffer reads. The article presents benchmark results showing significant improvements: a 92 MB JSON file reduces to 5.1 MB in RX format, with route lookups dropping from 69 ms (full JSON parse) to near-instant access.

Key quotes

· 5 pulled
RX is an embedded data store for JSON-shaped data. Encode once, then query the encoded document in place — no parsing, no object graph, no GC pressure.
Think of it as no-SQL SQLite: unstructured data with database-style random access.
When encoding as RX, pointers deduplicate automatically: ^z reuses 'apple', ^h reuses the shared key layout.
The encoded form is queryable as-is — no parsing step, just direct reads from the buffer.
Benchmarked on a real 92 MB deployment manifest with 35,000 route keys: JSON (92 MB, 69 ms lookup) vs RX (5.1 MB, 0.00 ms lookup).
Snippet from the RSS feed
RX encoder, decoder, and CLI data tool. Contribute to creationix/rx development by creating an account on GitHub.

You might also wanna read