Encode integers as big-endian
Author: RemiBardonCreated Sep 23, 2026Updated Sep 23, 2026
Labelsarea:performancebreaking
I don’t know why Sonic used to store integers in little-endian format, but big-endian would keep hash keys lexicographically sorted in binary format, reducing the load on RocksDB when sorting.
For example, IIDs are sorted because they come from a counter… but storing them in big-endian breaks it and makes sorting wasteful.
This is part of a bigger plan to unlock blazing fast ingestion.
Source: valeriansaliou/sonic