lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <>
Subject [jira] Commented: (LUCENE-1607) String.intern() faster alternative
Date Mon, 20 Apr 2009 12:20:47 GMT


Mark Miller commented on LUCENE-1607:

bq. The thread safety problem has to do with safe object publication

Oh, great, you mean basic concurrency competency :( Well thats an embarrassing erosion of
knowledge. Back to the books. Thread a has no happens before relationship with thread b unless
they share the lock. I trained myself to just synchronize or use volatile long ago (and then
let the knowledge begin seeping I guess), but even still, every time I see one of these double
lock check type tricks I go, eh, this one must work or something.

> String.intern() faster alternative
> ----------------------------------
>                 Key: LUCENE-1607
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Earwin Burrfoot
>             Fix For: 2.9
>         Attachments: intern.patch, LUCENE-1607.patch
> By using our own interned string pool on top of default, String.intern() can be greatly
> On my setup (java 6) this alternative runs ~15.8x faster for already interned strings,
and ~2.2x faster for 'new String(interned)'
> For java 5 and 4 speedup is lower, but still considerable.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message