3 ms·
The GPU isn't a "make code run fast" button, there are all sorts of algorithms that run poorly on a GPU because of its heavy SIMD structure and its programming
by Jasper_ 6y ago
The GPU isn't a "make code run fast" button, there are all sorts of algorithms that run poorly on a GPU because of its heavy SIMD structure and its programming model requires a programmer to cross their ts and dot their is, and the overhead of uploading/downloading data is not free, and scheduling tasks is not free.
Look at how ISPC had to change the C language to make it parallelizable for actual problems. I've attempted to write compute frustum culling in GPU.js and it came out slower than my CPU approach. Hand-written shader performed much better than either.