Bijou64: A variable-length integer encoding that's both correct and accidentally fast
By
justinweiss
Toasted golden, schmeared with insight. Top of the rack.
Summary
This article describes the development of bijou64, a variable-length integer (varint) encoding created for the Subduction CRDT sync protocol. The encoding was designed to fix a signature-verification bug by ensuring each number has only one possible representation (canonical encoding). An unexpected side benefit was that bijou64 runs several times faster than the more common LEB128 varint encoding. The author explains how the design constraints for correctness inadvertently led to performance improvements by requiring less computational work during encoding and decoding.
Key quotes
· 4 pulledIt's nice when you work on security and accidentally get some performance for free.
We didn't set out to write a fast varint, but it turns out that our design constraints made for an encoding that has to do less work.
It was intended to fix a subtle signature-verification bug by making each number only representable a single way.
It turned out to also run a few times faster than the more common varint LEB128.
You might also wanna read
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
Domain Expertise, Not Code, Is the True Competitive Advantage in Software
The article argues that true competitive advantage ("moat") in software has always been domain expertise—deep understanding of the business
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
Vibe Coding Produces Code, But Engineering Produces Reliable Systems
This article argues that "vibe coding" (using AI/LLMs to generate code without engineering rigor) produces code but not reliable systems. It
