3 ms·
All WebGL implementations have significant overhead compared to native GL. For example, just clearing the screen at 60 fps taxes my CPU at 10% on Windows (30% o
by johndough 8y ago
All WebGL implementations have significant overhead compared to native GL. For example, just clearing the screen at 60 fps taxes my CPU at 10% on Windows (30% on Linux) while a C program that does the same uses 0% CPU.
The reason for the performance penalty with Firefox on Linux is that the framebuffer content is copied from GPU to host memory, compositing is done and then it's copied back to GPU.
For other platforms I'm not sure.
Further, SIMD support has been removed from Javascript and not been added back to WebAssembly yet, so that's another factor 4-8 for computation-heavy code. Experimental pthread support is only available in Chrome experimental for now due to the Spectre and Meltdown exploits. And general GPU compute apparently is really tricky to implement in a secure way, although DOOM does not use it.
- floatboth 8y ago> copied from GPU to host memory, compositing is done and then it's copied back to GPU Shouldn't happen with GPU compositing in Firefox (layers.acceleration.force-enabled), right?