Re: Further BigInteger performance improvements

2009-06-04 Thread Andrew Haley
Alan Eliasen wrote: From the queries I get, this is important to a lot of people. The performance of BigInteger can be improved by tens or hundreds or thousands of times (or even more in the case of certain arguments of pow()), and should be done to make Java a more viable platform for

Re: core-libs-dev Digest, Vol 26, Issue 4

2009-06-04 Thread Paulo Levi
I hope you get this in.

Re: Further BigInteger performance improvements

2009-06-04 Thread Alan Eliasen
Andrew Haley wrote: You give examples of the speedup for very large bignums, but you don't say the size of numbers at which your approach becomes faster than the current code. Of course any asymptotic improvement helps with numbers that are half a million decimal digits long, but where's the

Re: Further BigInteger performance improvements

2009-06-04 Thread Alan Eliasen
Alan Eliasen wrote: Note that my optimizations for the pow() function give vastly better performance at even small bit sizes for many operands, as they factor out powers of 2 in the exponent and perform these very rapidly as bit-shifts. Oops. I mean powers of 2 in the *base*, of

Re: Faster HashMap implementation

2009-06-04 Thread Alex Yakovlev
Doug, On Thu, Jun 4, 2009 at 4:32 PM, Doug Lea d...@cs.oswego.edu wrote: The main one is that LinkedHashMap is declared as a subclass of HashMap. There's not an obvious way to add insertion- or access- ordered links to your version. Well, it can be done by adding another index array, I've