Sumit, Adrian, All,

I had a cursory look at it. In abstract, yes this seems to be right

Though those lines you took from Google are 4 years old 
http://www.javalobby.org/java/forums/t9377.html?start=15#reply20

Anyway it seems to be right, here the answer from Javolution Creator (JM 
Dautelle)
The best analogy between FastMap and HashMap would be buying versus renting. 
With FastMap you pay upfront but you are done with it.
With HashMap you pay each time you "put" a new entry (not only when you 
allocate but also later with the GC interests...). Obviously
if you intend to sell your house three months later it does not make sense to 
buy it.

Also interesting is JM Dautelle's this note found at 
http://javolution.org/doc/benchmark.html
>Although it looks nice, I see that some of your collection classes are not 
>always faster than their Java 6 counterparts.
<<Some classes are faster, others are slower (for example ArrayList.get(int) is 
faster with the -server option, slower without it).
Overall, there is no significative difference in average execution time. The 
main advantage of Javolution collections is that they
are time-deterministic (the maximum execution time is very close to the minimum 
execution time) and they are RTSJ-Safe.
They have some additional characteristics such as thread-safe without 
synchronization, support for custom key/value comparators,
direct record iterations (faster than iterators), recyclable, reduced impact on 
GC (fragmentation or large arrays allocations),
support for custom entry implementation (FastMap) or custom node implementation 
(FastList), etc.>>

See also 
http://noctarius.l2castell.org/download/benchmark_trove_javolution_java.pdf

Maybe knowning the real reason(s?) it was integrated in OFBiz would be cool, 
does not look like a big deal tough, am'I wrong ?

Jacques

De : "Adrian Crum" <[EMAIL PROTECTED]>
> I just spent some time running performance tests on FastMaps and HashMaps. 
> Calling the get methods
> showed no speed difference. The Javalution classes seem to have a speed 
> advantage in building Maps
> and Lists. They claim their FastSet.removeLast method is faster than the Java 
> library. So, there is
> a speed advantage in certain scenarios, but not in all cases.
>
> -Adrian
>
> Sumit Pandit wrote:
>
> > *i have a question please make me correct if i am wrong :-*
> >
> > if we compare  FastMap Vs HashMap,
> >
> > *FastMap is faster than HashMap so long as the map is long lived and
> > relatively predictable in size. If you try to use it as a short-lived
> > general replacement for HashMap it may very well kill your performance.
> >
> > *I found these lines some where in Google.
> > so does it mean that we should use HashMap for local variables ?
> >
> > Also please explain me the performance issue if we use HashMap rather then
> > FastMap.
> >
> > Thanks for suggestion.
> >
>

Reply via email to