commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@centras.lt>
Subject Re: [Collections] StaticBucketMap not thread safe
Date Wed, 26 Jun 2002 20:16:53 GMT
1) You must not test Maps in the same process, the first started is faster,
because of memory usage.
2) "InitialCapacity" must be the same.
3) Maps must be tested with both "random" and "random_or_not" * x

this is with 100 threads:

   [junit] Synchronized HashMap took 875ms
    [junit] Thats 8.75E-4ms per operation
    [junit] BucketMap (5001 buckets) took 609ms
    [junit] Thats 6.09E-4ms per operation
    [junit] Unsized BucketMap (255 buckets) took 1157ms
    [junit] Thats 0.001157ms per operation



> > From: Juozas Baliuka [mailto:baliuka@centras.lt]
> >
> >
> > I modified test, both tests show nothing, but this shows how
> > to write "bad" and "good" performance tests :)
> > Output:
>
> And what's different besides the number of threads?
>
> The BucketMap is designed for server environments (i.e. servlet
> environments) where having 40-100 threads of execution using one
> map.
>
> So how is only 10 better than 100?
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message