News for hackers. Stuff that matters.
Re:Efficient float32 arithmetic in JavaScript by kevingadd on Thursday November 07, 2013 @01:59PM (#6691576)
FP64 is more expensive on GPUs than FP32 (the cost gap depends on the particular architecture, but I've seen 1/8 and 1/4 ratios listed for recent parts) - so even if all modern desktop CPUs don't pay an extra cost for FP64, it's still worth thinking about the size of your floats for GPU compute.

Also, it's important to keep in mind that even if the cycle count is the same, you're using twice as much memory which means you're occupying twice as much space in cache. If your buffers suddenly get twice as large to represent the same data, that's going to negatively impact performance, just like how 64-bit pointers result in a perf penalty vs 32-bit pointers. If everything stays in registers you're probably fine, since those are all fixed-size and usually have more than enough space for a few 64-bit floats.

Re:Efficient float32 arithmetic in JavaScript by mistercow on Thursday November 07, 2013 @02:07PM (#6691652)
Those are good points. I think the other points the article makes are valid too. Again, I was just taking issue with the specific claim of "CPU cycles". I think it's important because thinking CPUs still work the way they did 15 years ago is a common source of premature optimization.