On Sun, Apr 19, 2009 at 23:16, Chris Miller <chris.mil...@kbcfp.com> wrote:
> As far as I can see, both these implementations only suffer from
> threadsafety problems in that they don't guarantee visibility across
> threads, ie it's possible for threads to see stale data.

> So the code should work fine if you can live with the consequences of stale
> data - in this case, the (remote) possibility of large performance
> differences between VMs.

I guarantee just enough visibility for this code to never ever produce
incorrect results.
As soon as all possible fields are in the pool, we're essentially readonly.
Take whatever JVM you have out there, readonly will beat anything
performance-wise :)

> How about benchmarking with eg a ConcurrentHashMap instead?
No Java 5 until 3.0. It will be slower anyway.

-- 
Kirill Zakharenko/Кирилл Захаренко (ear...@gmail.com)
Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
ICQ: 104465785

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to