Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Alterantively one can use Math.abs().


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: