You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Aleksey Shipilev (JIRA)" <ji...@apache.org> on 2008/05/14 12:23:55 UTC

[jira] Created: (HARMONY-5825) [classlib][math] RSA-related performance optimization

[classlib][math] RSA-related performance optimization
-----------------------------------------------------

                 Key: HARMONY-5825
                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
             Project: Harmony
          Issue Type: Improvement
          Components: Classlib
            Reporter: Aleksey Shipilev


This issue optimizes java.math.* parts involved in RSA computation.
SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596719#action_12596719 ] 

Aleksey Shipilev commented on HARMONY-5825:
-------------------------------------------

RC1 has passed JUnit tests for entire classlib.

Gives +20% on SPECjvm2008:crypto.rsa running on 8-core Clovertown.

> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>         Attachments: cl-math-rsa-rc1.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600609#action_12600609 ] 

Aleksey Shipilev commented on HARMONY-5825:
-------------------------------------------

The discussion on dev-list: http://www.mail-archive.com/dev@harmony.apache.org/msg14707.html

> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>         Attachments: cl-math-rsa-rc1.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596724#action_12596724 ] 

Aleksey Shipilev commented on HARMONY-5825:
-------------------------------------------

HARMONY-5826 implements the magic for (a*b + c + d), giving another +35% boost.
Total boost achieved is +55%.


> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>         Attachments: cl-math-rsa-rc1.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Shipilev updated HARMONY-5825:
--------------------------------------

    Attachment: cl-math-rsa-rc1.patch

cl-math-rsa-rc1.patch
Proposed patch.

There are many changes, but they're depend on each other:
 - eliminates redundant zero extensions ( (int)i & ffffffffL ) and changes the signatures of several internal methods accordingly
 - extracts frequent (a*b + c + d) as separate methods thus allowing magic generation
 - breaks monPro into three pieces: array multiplication, Montgomery reduction, final substractio
 - eliminates monSquare(x, ...) and moves the algos to monPro(x, x, ...) usage
 - optimizes j.m.Division.multiplyAndSubstract to be faster and clearer
 - optimizes j.m.Division.modInverseMontgomery to be faster
 - caches and reuses BigIntegers that are powers of 2
 - does not perform bit shifting for zero values


> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>         Attachments: cl-math-rsa-rc1.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-5825.
--------------------------------


No response, assuming ok.

> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: cl-math-rsa-rc1.patch, cl-math-rsa-rc2.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison reassigned HARMONY-5825:
------------------------------------

    Assignee: Tim Ellison

> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: cl-math-rsa-rc1.patch, cl-math-rsa-rc2.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Shipilev updated HARMONY-5825:
--------------------------------------

    Attachment: cl-math-rsa-rc2.patch

cl-math-rsa-rc2.patch:
The patch was updated upon the discussion on dev-list:
 - javadoc for methods
 - minor cleanup

> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>         Attachments: cl-math-rsa-rc1.patch, cl-math-rsa-rc2.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5825) [classlib][math] RSA-related performance optimization

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison resolved HARMONY-5825.
----------------------------------

    Resolution: Fixed

Thanks Aleksey.

Patch applied to MATH module at repo revision r669154.

Please check it was applied as you expected.


> [classlib][math] RSA-related performance optimization
> -----------------------------------------------------
>
>                 Key: HARMONY-5825
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5825
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: cl-math-rsa-rc1.patch, cl-math-rsa-rc2.patch
>
>
> This issue optimizes java.math.* parts involved in RSA computation.
> SPECjvm2008:crypto.rsa is used as reference RSA implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.