HashMap is by definition really slow in iteration, but LinkedHashMap isn't.

Have you tried replacing the HashMaps with LinkedHashMaps?
Of course a custom Map implementation can be optimized, but I wouldn't be surprised if any of these:
- LinkedHashMap
- one of http://jakarta.apache.org/commons/collections/
- one of http://www.javolution.org/
might even be equally fast (or faster) and even better time predictable?

Peter Lin wrote, On 2006-11-07 1:28 AM:

interesting stuff.  leaps backward chaining is powerful.

peter


On 11/6/06, *Peter Van Weert* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    http://www.cs.kuleuven.be/~petervw/JCHR/

    A small performance result you guys can relate to: I think manners128
    runs in .5 second (*). One important contributing factor to this result
    is undoubtedly that JCHR is compiled and executed using a Leaps-like
    algorithm, rather than a RETE-based one, but JCHR is highly optimized in
    several other ways as well.

    CHeeRs,
    Peter



    Footnote:
    (*) negation as absence -- necessary for manners -- is not yet a
    documented feature, but there is a partial implementation, enough to run
    manners

    Peter Lin schreef:
     > what's your rule engine?  i'm curious
     >
     > peter
     >
     > On 11/6/06, *Peter Van Weert* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
     > <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>> wrote:
     >
     >     Yup, I did the same. I stripped HashMap down to its bare
    essence. I
     >     looked at the new JBoss hash-map code and I think the general
    idea is
     >     the same. Didn't give much performance gains though in my
    case (didn't
     >     even include it in my release yet). That's why I thought it
    had to be a
     >     combination of other factors.
     >     Oh well, not to worry, my performance is already more then
    good enough.
     >     Will look for other ways of improving it even more.
     >
     >     Thanks for the replies!
     >
     >     -Peter
     >
     >



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

        http://xircles.codehaus.org/manage_email




--
With kind regards,
Geoffrey De Smet


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

   http://xircles.codehaus.org/manage_email

Reply via email to