3 ms·
> But integer arithmetic is not necessarily faster than floating point arithmetic in general; GPUs was the first place I feel like floats got a much better pat
by gopalv 9y ago
> But integer arithmetic is not necessarily faster than floating point arithmetic in general;
GPUs was the first place I feel like floats got a much better pathway than any other data type - graphical pixel manipulations also can get away with much higher arithmetic errors, because it's all going to get rounded down to a pixel eventually.
On the other hand, the only place where I've really worked heavily with fixed point was on a graphical interface toolkit (MIDP on ARM I was working with would've had to use softfp for floats, so fixed point was hugely superior).
- AstralStorm 9y agoCome on, all reasonable ARM have NEON and VFPv3 (including cortex M) about the only place I saw something that didn't was an old internet router. Hardware completely unsuited to maths. Softfp does not preclude the use of floating point math at all. It means you pay an extra cost when passing floats as arguments. (Which means you should rather use a hardfp math library if possible.)
- gopalv 9y ago> Come on, all reasonable ARM have NEON and VFPv3 (including cortex M) about the only place I saw something that didn't was an old internet router ARM MIDP UI code in 2003-2004 - very interesting chip (ARM926EJ-S [1]) ... not that I ever invented anything new to do all this, all of what I did was learn & repeat tricks from 1980s arcade consoles. [1] - https://en.wikipedia.org/wiki/Jazelle#BXJ:_Branch_to_Java https://en.wikipedia.org/wiki/Jazelle#BXJ:_Branch_to_Java