News for hackers. Stuff that matters.
Re:Std: Clamp generates less efficient assembly than std:min... by cogman10 on Tuesday January 16, 2024 @10:46AM (#39014619)
The main problem with floats in general is they are designed primarily for scientific computing.

We are fortunately starting to see newer (well, not that new now) CPU instructions like FMA that make more accurate decimal representations not take such huge performance hits.

Re:Std: Clamp generates less efficient assembly than std:min... by adgjlsfhk1 on Tuesday January 16, 2024 @12:18PM (#39015863)
what does fma have to do with decimal numbers?
Re:Std: Clamp generates less efficient assembly than std:min... by cogman10 on Tuesday January 16, 2024 @12:51PM (#39016309)
Oh shoot, nvm, I thought it was an optimization for integers.

Really it'll be the SIMD style instructions that speeds things up.