commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Cooper (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-954) Faster implementation of FastMath.abs
Date Mon, 25 Mar 2013 19:09:15 GMT

     [ https://issues.apache.org/jira/browse/MATH-954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Charles Cooper updated MATH-954:
--------------------------------

    Attachment: patch
    
> Faster implementation of FastMath.abs
> -------------------------------------
>
>                 Key: MATH-954
>                 URL: https://issues.apache.org/jira/browse/MATH-954
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1.1
>         Environment: java version "1.6.0_27"
> OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
> Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64 GNU/Linux
> Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
>            Reporter: Charles Cooper
>            Priority: Minor
>              Labels: optimization, patch
>             Fix For: 3.2
>
>         Attachments: patch, patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Faster implementations of abs() which use bitwise operations in preference to branching.
By my benchmark abs(double/float) are about 10-20% faster, and abs(long/int) more than twice
as fast. Patch attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message