zlacker

[return to "Std: Clamp generates less efficient assembly than std:min(max,std:max(min,v))"]
1. fooker+Ah[view] [source] 2024-01-16 13:18:31
>>x1f604+(OP)
If you benchmark these, you'll likely find the version with the jump edges out the one with the conditional instruction in practice.
◧◩
2. svanta+tl[view] [source] 2024-01-16 13:44:00
>>fooker+Ah
That must depend on the platform and the surrounding code, no?
◧◩◪
3. fooker+fy[view] [source] 2024-01-16 15:01:52
>>svanta+tl
Yes. On platform - most modern cpus are happier with predictable branches than exotic instructions.

On surrounding code - for sure.

[go to top]