It was lots of small things, Iterators use  a lot of memory in tight loops. But I also unrolled loops and cached repeatedly read values  on join attempts.

Mark
Peter Lin wrote:


the iterator in HashMap is slow. it's very slow, so that ends up slowing down pattern matching. Mark aggressively stripped away most of the abstraction. when I say strip, I really mean stripped.

If java.util.HashMap was a women, imark's custom hashtable would be naked.  no bikini, no g-string.

peter


On 11/6/06, Peter Van Weert <[EMAIL PROTECTED]> wrote:
I really cannot believe much can be gained simply by implementing a
custom HashMap. I tried this once for my rule engine (i.e. inlining,
some extra methods, stripping away all unnecessary code, etc.) and the
performance gains were marginal. My guess is that you combined the
custom HashMap with other, more important changes in your
data-structures. Am I correct?

Peter Lin schreef:
>
> I was guessing a faster HashTable/HashMap would make a difference, but
> even I'm surprised at how much the little things add up.
>
> it makes complete sense, since that where a lot of the cycles are spent
> in pattern matching, so those lookup and iterators make the difference.
>
> peter
>
> On 10/21/06, *Mark Proctor* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     http://woolfel.blogspot.com/2006/10/custom-hashtable.html
>
>     Mark
>
>     ---------------------------------------------------------------------
>     To unsubscribe from this list please visit:
>
>         http://xircles.codehaus.org/manage_email
>
>



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




Reply via email to