2 ms·
Alterantively one can use Math.abs().
by BlissWaves 5y ago
Alterantively one can use Math.abs().
- jonas21 5y agoNot 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 https://github.com/openjdk/jdk/pull/4711