News for hackers. Stuff that matters.
Re:One does not simply calculate the absolute value by BlissWaves on Monday August 23, 2021 @12:10AM (#28272267)
Alterantively one can use Math.abs().
Re:One does not simply calculate the absolute value by jonas21 on Monday August 23, 2021 @12:39AM (#28272382)
Not if you're writing Math.abs().

The motivation for the article is this change in OpenJDK, where they got a 10% performance improvement by switching from the single-branch implementation to the branchless one:

https://github.com/openjdk/jdk/pull/4711