WebGPU vs WebGL Benchmark

Draw the same scene with both APIs, per object and instanced, and compare them on your own browser and GPU. A full run takes about a minute.

What this benchmark measures

Every mode draws the same scene: a number of small coloured quads, each with its own position, size and colour, animated every frame. Two numbers matter:

The four modes

ModeHow each frame is drawn
WebGL2, per objectOne uniform4fv call and one drawArrays call for every object.
WebGPU, per objectOne writeBuffer for all objects, then a dynamic-offset setBindGroup and a draw for every object.
WebGL2, instancedAll object data in one buffer, drawn with a single instanced call.
WebGPU, instancedAll object data in a storage buffer, drawn with a single instanced call.

How to read your results

Compare modes within the same object count, not across browsers or machines. If one draw call per object is much slower than instancing in both APIs, that is the cost of issuing draw calls, and the reason games batch their objects. If WebGPU per object stays fast at large counts but FPS drops, the browser's GPU process has become the bottleneck rather than your JavaScript.

Our own results from an Apple M1 Pro, and why they look the way they do, are in the article WebGPU vs WebGL: real numbers.

Tips for fair numbers

Questions

Why does the benchmark say WebGPU is not available?
WebGPU needs a recent Chrome, Edge or Safari, or Firefox on Windows, and a supported GPU. The WebGL2 modes still need WebGL2. See What is WebGPU? for browser support.
Is WebGPU always faster than WebGL?
No. WebGPU removes a lot of driver work, but for simple scenes with many tiny draw calls WebGL2 can use less JavaScript time. The big win in both APIs is drawing many objects with one call, which this benchmark shows with the instanced modes.
Is any data sent anywhere?
No. The benchmark runs entirely in your browser and the results stay on this page.