5 ms·
> let alone more performant Not anymore. On modern hardware, the only operation where integers win is single cycle add/sub. For the rest of operations (multipl
by Const-me 4mo ago
> let alone more performant
Not anymore. On modern hardware, the only operation where integers win is single cycle add/sub. For the rest of operations (multiplication, division, square roots, etc.) floating point is faster, sometimes by a lot.
- rasz 4mo agoIf you care about performance you use logs and then multiplications turn into integer additions.
- Const-me 4mo agoOn modern processors, floating point addition often has equal performance to floating point multiplication. For example, on AMD Zen4 it’s 3 cycles latency and 0.5 cycles throughput. I’m not sure that trick going to work in the context of computer graphics. To transform vectors or multiply matrices you need a mix of multiplications and additions, or an equivalent sequence of FMAs.