zlacker

[parent] [thread] 0 comments
1. superj+(OP)[view] [source] 2024-01-16 19:49:54
The only times I worry about min/max/clamp performance is when I need to do thousands or millions of them. And in that case, I’d suggest intrinsics. You get to choose how NaN is handled, it’s branchless, and you can do multiple in parallel.

It feels backwards that you need to order your comparisons so as to generate optimal assembly.

[go to top]