lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earwin Burrfoot <ear...@gmail.com>
Subject Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative
Date Sun, 19 Apr 2009 19:28:02 GMT
On Sun, Apr 19, 2009 at 23:16, Chris Miller <chris.miller@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/Кирилл Захаренко (earwin@gmail.com)
Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
ICQ: 104465785

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


Mime
View raw message