Histograms

← All benchmarks · Chapter 16

Some of these measurements depend on the host as much as on the GPU: launch overhead is CPU dispatch cost, transfer rates are bounded by the host link and the host's memory system, and the CPU baselines run entirely on the host. Results for one GPU are reported separately per host architecture whenever it has been measured on more than one.

![histogram.per-grid: Mpix/s by values count (log-log; book-era curves join when baselines land)](/benchmarks/media/histogram-per-grid.svg) ![histogram.per-block: Mpix/s by values count](/benchmarks/media/histogram-per-block.svg)

histogram.cpu.multi (Gpix/s) -- histogram/histogram.cu: multithreaded CPU reference

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 7.4 8.1 9.6 6.7 10.8 7.6 5.5 3.8 9.4 2

histogram.cpu.single (Gpix/s) -- histogram/histogram.cu: single-threaded CPU reference

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 4.2 4.1 4.1 4.1 4.1 3.9 2.9 1.7 4.8 2

histogram.npp (Gpix/s) -- histogram/histogram.cu: NVIDIA Performance Primitives nppiHistogramEven

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 280.6 281.9 285.3 283.5 246.4 198.0 155.9 138.7 291.6 2

histogram.per-block (Gpix/s) -- histogram/histogram.cu: per-block privatized histograms in shared memory, atomics

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 107.7 107.9 108.1 107.8 108.0 107.6 107.7 107.9 107.7 2

histogram.per-block-4x (Gpix/s) -- histogram/histogram.cu: per-block, 4 pixels per thread

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 278.7 277.8 279.9 280.8 280.7 278.7 279.5 276.9 280.8 2

histogram.per-block-4x-offset (Gpix/s) -- histogram/histogram.cu: per-block, 4x unrolled, warp-offset

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 275.8 279.7 279.7 278.6 281.4 278.6 279.3 279.6 282.0 2

histogram.per-block-offset (Gpix/s) -- histogram/histogram.cu: per-block with per-warp offset to spread contention

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 106.6 107.0 107.0 107.1 107.3 107.2 107.1 107.0 107.0 2

histogram.per-block-reduce (Gpix/s) -- histogram/histogram.cu: per-block histograms merged by reduction

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 161.4 162.6 161.3 162.0 162.3 162.2 162.1 163.6 162.2 2

histogram.per-block-reduce-offset (Gpix/s) -- histogram/histogram.cu: per-block reduction merge, warp-offset

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 160.8 160.7 161.7 162.3 162.7 161.1 161.0 162.0 162.6 2

histogram.per-grid (Gpix/s) -- histogram/histogram.cu: one histogram in global memory, atomics fired per-pixel

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 3.5 4.8 3.2 4.2 4.5 4.4 2.8 1.7 1.7 2

histogram.per-thread-4x32 (Gpix/s) -- histogram/histogram.cu: per-thread histograms, 32-count cells, 4x unrolled

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 45.8 45.9 45.9 46.0 46.0 45.8 45.7 45.8 45.9 2

histogram.per-thread-4x32-periodic-merge (Gpix/s) -- histogram/histogram.cu: per-thread 4x32 with periodic merge

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 63.6 64.2 64.5 64.3 64.0 63.9 63.9 64.8 64.0 2

histogram.per-thread-4x64 (Gpix/s) -- histogram/histogram.cu: per-thread 64-count, 4x unrolled

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 65.4 65.8 66.2 65.9 66.3 66.0 66.5 66.5 66.6 2

histogram.per-thread-4x64-periodic-merge (Gpix/s) -- histogram/histogram.cu: per-thread 4x64 with periodic merge

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 71.2 71.1 71.1 70.8 70.7 70.9 71.3 70.8 71.6 2

histogram.per-thread-64 (Gpix/s) -- histogram/histogram.cu: per-thread histograms, 64-count cells

GPU 256 128 64 32 16 8 4 2 1 n
Ampere
GeForce RTX 3060 25.7 25.7 25.7 25.7 25.7 25.7 25.7 25.7 25.7 2

Submissions

  • rtx-3060 · nwilt-2026-07-12-2.json -- Nicholas Wilt · driver 580.95.05 · CUDA 12.9
  • rtx-3060 · nwilt-2026-08-27.json -- Nicholas Wilt · driver 580.95.05 · CUDA 13.0