lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (LUCENE-1607) String.intern() faster alternative
Date Wed, 29 Apr 2009 18:43:30 GMT


Yonik Seeley commented on LUCENE-1607:

bq. why h >> 7?

Was copied from Solr's hashing of doc ids... we didn't want to throw away too many lower bits
since they were likely to be the most random.  In string hashes, the rightmost bits also have
the most entropy.

bq. Should I add a patch with Yonik's last hash impl and all calls to String.intern() replaced
to get it moving? 

That would be helpful, thanks!

> 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, LUCENE-1607.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