You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Daniel Fridlender <df...@gmail.com> on 2006/11/08 01:54:41 UTC

[classlib][java.math] optimization of BigInteger.modInverse

Hi,

In http://issues.apache.org/jira/browse/HARMONY-2091 there is an
optimization for modInverse.  The issue includes a patch and two html
files showing the performance of the method before and after the
patch.

In order to obtain this optimized version algorithms from the articles
"The Montgomery Modular Inverse - Revisited" (by Savas, E; Koc, C) and
"New Algorithm for Classical Modular Inverse" (by Lórencz, R) were
implemented.  Also some ad-hoc combination of arithmetic operations
were introduced in order to avoid unnecessary creation of intermediate
data.

Thanks,

Daniel

Re: [classlib][java.math] optimization of BigInteger.modInverse

Posted by Daniel Fridlender <df...@gmail.com>.
It should be fixed now.

Thanks

Daniel

On 11/8/06, Mikhail Loenko <ml...@gmail.com> wrote:
> Hi Daniel
>
> I've tried the patch you suggested. It causes failure of
> org.apache.harmony.tests.java.math.BigDecimalArithmeticTest
>
> Could you please take a look?
>
> Thanks,
> Mikhail
>
> 2006/11/8, Daniel Fridlender <df...@gmail.com>:
> > Hi,
> >
> > In http://issues.apache.org/jira/browse/HARMONY-2091 there is an
> > optimization for modInverse.  The issue includes a patch and two html
> > files showing the performance of the method before and after the
> > patch.
> >
> > In order to obtain this optimized version algorithms from the articles
> > "The Montgomery Modular Inverse - Revisited" (by Savas, E; Koc, C) and
> > "New Algorithm for Classical Modular Inverse" (by Lórencz, R) were
> > implemented.  Also some ad-hoc combination of arithmetic operations
> > were introduced in order to avoid unnecessary creation of intermediate
> > data.
> >
> > Thanks,
> >
> > Daniel
> >
>

Re: [classlib][java.math] optimization of BigInteger.modInverse

Posted by Mikhail Loenko <ml...@gmail.com>.
Hi Daniel

I've tried the patch you suggested. It causes failure of
org.apache.harmony.tests.java.math.BigDecimalArithmeticTest

Could you please take a look?

Thanks,
Mikhail

2006/11/8, Daniel Fridlender <df...@gmail.com>:
> Hi,
>
> In http://issues.apache.org/jira/browse/HARMONY-2091 there is an
> optimization for modInverse.  The issue includes a patch and two html
> files showing the performance of the method before and after the
> patch.
>
> In order to obtain this optimized version algorithms from the articles
> "The Montgomery Modular Inverse - Revisited" (by Savas, E; Koc, C) and
> "New Algorithm for Classical Modular Inverse" (by Lórencz, R) were
> implemented.  Also some ad-hoc combination of arithmetic operations
> were introduced in order to avoid unnecessary creation of intermediate
> data.
>
> Thanks,
>
> Daniel
>