Hacker News new | ask | show | jobs
by BlissWaves 1757 days ago
Alterantively one can use Math.abs().
1 comments

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