Re: Faster HashMap implementation

2009-06-04 Thread Alex Yakovlev
Doug, On Thu, Jun 4, 2009 at 4:32 PM, Doug Lea 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 commited it t

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 cou

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 t

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

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

Re: Faster HashMap implementation

2009-06-04 Thread Doug Lea
Alex Yakovlev wrote: Hello, While playing with scala programming language I've come to a HashMap implementation that appears to be faster than current java.util.HashMap, also with a lower memory footprint. This is a promising approach. The indirection using the index array makes for a bett

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

Further BigInteger performance improvements

2009-06-04 Thread Alan Eliasen
16 months ago, I posted the first of several patches to vastly improve the performance of the BigInteger class. These included implementation of Karatsuba and 3-way Toom-Cook multiplication and Karatsuba and Toom-Cook squaring. The particular algorithm used for multiplication or squaring is c

Re: Faster HashMap implementation

2009-06-04 Thread Ulf Zibis
See also: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6812862 -Ulf Am 04.06.2009 01:21, Alex Yakovlev schrieb: Hello, While playing with scala programming language I've come to a HashMap implementation that appears to be faster than current java.util.HashMap, also with a lower memory