Skip to content

Performance ​

Benchmark methodology: CRoaring's census1881 dataset, full client round-trip latency per command against a dockerized Valkey, compared with the equivalent native commands. The benchmark runs in CI whenever performance-relevant code changes and updates the table below automatically.

Reading the table: point operations (SETBIT/GETBIT) are round-trip dominated and land at parity with native commands. The wins appear where native bitmaps do O(N) work on uncompressed bytes: BITCOUNT reads a cached cardinality, and the BITOP family operates on compressed containers — several times faster on this dataset.

OPTIME/OP (us)ST.DEV. (us)
R.SETBIT125.1416.12
R64.SETBIT124.6215.30
SETBIT123.7114.27
R.GETBIT124.0413.60
R64.GETBIT124.0313.98
GETBIT122.8512.98
R.BITCOUNT119.9115.76
R64.BITCOUNT115.3811.31
BITCOUNT132.5211.49
R.BITPOS115.945.77
R64.BITPOS116.6914.65
BITPOS122.4610.50
R.BITOP NOT276.14568.05
R64.BITOP NOT277.00533.02
BITOP NOT298.3592.27
R.BITOP AND129.7827.38
R64.BITOP AND152.8016.89
BITOP AND299.21201.50
R.BITOP OR156.5138.52
R64.BITOP OR155.6438.46
BITOP OR401.46321.16
R.BITOP XOR151.8940.89
R64.BITOP XOR131.6542.77
BITOP XOR351.43288.43
R.BITOP ANDOR124.7225.41
R64.BITOP ANDOR124.0616.60
BITOP ANDOR130.5611.50
R.BITOP ONE156.4539.87
R64.BITOP ONE152.5946.87
BITOP ONE138.075.34
R.MIN114.1811.54
R64.MIN137.0311.75
MIN139.514.57
R.MAX130.3712.03
R64.MAX137.097.48
MAX113.3910.12

Notes: native MIN/MAX don't exist and BITOP ANDOR/BITOP ONE are not supported by Valkey 8.1, so those native rows measure error-reply round-trips. St.dev. is the per-command standard deviation. Numbers come from shared GitHub Actions runners — ratios between rows are meaningful, absolute latencies fluctuate.