RFR (S) CR 8006627: Improving performance and reducing object allocations of java.util.UUID to/from string

Mike Duigou mike.duigou at oracle.com
Wed Jan 30 19:42:21 UTC 2013


Good work Steven! 

Some initial comments;

- The changes to Long should be in a separate issue. It's generally encouraged for changesets to focus on only one change. Sorry, yes, it's additional overhead.

- I would like to see if performed of toString() can be improved further by using String(char[] value, boolean share) constructor via a sun.miscSharedSecret.JavaLangAccesss method to construct the string directly from the character array. You could test to see if this has positive benefit by temporarily using a static char array.

- public static String toString(long msb, long lsb) should be private. There's no compelling reason to add this to the API.

- Have you run this code against any of the existing regression tests?

Mike

On Jan 28 2013, at 19:23 , Steven Schlansker wrote:

> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8006627
> 
> I have created a patch that dramatically improves UUID to/from string performance.
> Please find below a webrev with my proposed changes.
> 
> Thanks in advance for any feedback on the contents.
> I do not believe I have a committer lined up yet.
> My company has a signed OCA on file, "Ness Computing".
> 
> http://dl.dropbox.com/u/1422321/uuid_webrev/index.html
> http://dl.dropbox.com/u/1422321/uuid_webrev.zip
> 




More information about the core-libs-dev mailing list