Pick a size, see who wins
Drag the slider on each workload to pick a problem size. The implementations animate to their relative wall-clock times — longer bar = slower. The fastest implementation glows green; the slowest dims red.
Mandelbrot set
- CPU naive11.76 s
- CPU OpenMP1.75 s
- CPU AVX21.55 sFastest
- GPU naivenot measured
- GPU optimizednot measured
At 4096², GPU runs were not measured. Among CPU implementations, AVX2 (vectorized inner loop) holds its own against OpenMP (thread-level parallelism) — two different ways to cut per-pixel cost.
Dot product
- CPU naive101.28 ms
- CPU OpenMP29.41 ms
- CPU AVX235.54 ms
- GPU naive198.15 ms
- GPU optimized3.89 msFastest
At 100M elements, the math finally amortizes PCIe transfer. Optimized GPU is ~7× faster than naive GPU and ~9× faster than AVX2 — the lesson is the naive→optimized jump: a warp-shuffle reduction beats atomicAdd contention.
Heat equation (2D Jacobi)
- CPU naive1.52 s
- CPU OpenMP526.04 ms
- CPU AVX2515.65 ms
- GPU naive39.30 msFastest
- GPU optimized52.50 ms
At N=1024, naive GPU is the clear winner — about 13× faster than OpenMP. The tiled kernel is still slower than naive due to halo loading inefficiencies.