Simulations, imaging, and AI all repeat the same calculation over millions of data points. GPUs are built for exactly that, and almost every phone and laptop has one. Let's measure yours.
Tap the image to zoom in. Deep zoom jumps to a tiny region: compare All cores with GPU there. The GPU image turns blocky because WebGPU has only 32-bit floats, while JavaScript uses 64-bit.
Every pixel of a Mandelbrot image is an independent calculation: the same small program on different data, exactly the kind of work GPUs are built for.
CPU: plain JavaScript, first in one worker thread, then one worker per core. GPU: a WebGPU compute kernel with one GPU thread per pixel, timed after a warm-up launch (best of three).
Supercomputer comparison: the CPU run counts every Mandelbrot step; at about 8 floating-point operations per step, dividing by the GPU time gives an estimated speed, compared with the world's fastest computers of the past (TOP500 No. 1 LINPACK results; Cray peak speeds). It is an order-of-magnitude comparison, not a benchmark.
Size adapts to your device: the page picks the largest image for which one CPU core takes about two seconds.
This is a demonstration, not a benchmark: optimized, vectorized C would make the CPU faster. Phones may throttle when hot or in low-power mode. Nothing is sent anywhere; all computation stays on your device.
Presenter keys: T test, 1 2 3 mode, D deep zoom, R reset.
The GPU kernel (WGSL), written for one pixel: