LedgerMath
← All benchmarksHow compressed_memory_read works

Decode bit-packed integers

compressed_memory_read · compared across machine types · 8 Series on 8 machine types · AWS us-east-2

CPU
Order
CompareMachineVariantP50P99RateUnit costRuns
c8a.2xlarge19.83 ns—51.63 GB/s$0.00833 /GB/s·h89
c8i.2xlarge24.30 ns—42.13 GB/s$0.00904 /GB/s·h89
c6i.8xlarge51.53 ns—19.87 GB/s$0.0684 /GB/s·h89
i4i.2xlarge51.68 ns—19.81 GB/s$0.0351 /GB/s·h89
m6id.2xlarge51.79 ns—19.77 GB/s$0.024 /GB/s·h1
m5.large59.18 ns—17.30 GB/s$0.00557 /GB/s·h91
c8g.2xlarge76.55 ns—13.38 GB/s$0.0238 /GB/s·h4
i4g.2xlarge96.20 ns—10.64 GB/s$0.058 /GB/s·h4
Compared:m5.largec8g.2xlargec8i.2xlarge

Run-to-run spread

time per 256 B block across counted Runs

Over time

newest counted Runs, time per 256 B block

(one request each to the data API)

What this measures

How fast one thread unpacks integers stored at a width of bits into 32-bit integers, the decode step of a compressed column, cycling through a pool of blocks blocks meant to come from memory rather than cache. Whether the pool exceeds the cache depends on the machine.

What it does not measure

  • Only 8 bits per value is implemented. At that width, unpacking a value is widening one byte to a 32-bit integer, so the figure says nothing of other widths.
  • Every repetition writes its 256 values to the same 1024-byte output array; only the packed input moves through the pool.
  • Whether the pool is read from memory or from cache depends on its size and on the machine's caches, which the Run's dump sections lscpu and sys_cpu record. A pool that fits in a cache gives a cache figure.

The whole method, on its page →

c8i.2xlarge

Beat this hot path on GitHub ↗