Re: java.util.UUID.fromString performance

2012-02-28 Thread Vitaly Davidovich
Mike, I can certainly try to do that. Given how trivial the change is and the somewhat obvious observation that Long.parseLong would avoid boxing compared to Long.decode, I was simply pointing out a fairly easy change that could be made in case the maintainers of this class simply haven't looked

Re: java.util.UUID.fromString performance

2012-02-28 Thread Mike Duigou
The easiest wat to proceed would be for you to submit a webrev patch with both changes along with your microbenchmark test. Once the change is incorporated in the jdk8 mainline the sustaining teams can evaluate it for backporting to jdk 7 and 6. Mike On Feb 28 2012, at 06:26 , Vitaly Davidovic

Re: java.util.UUID.fromString performance

2012-02-28 Thread Vitaly Davidovich
Alan, Sorry I should've stated that I looked at this in detail in java 6 but only glanced at the UUID impl in 7 just now on my phone. If String.split() has a fast path now then forget my suggestion #1 :). Using Long.parseLong should still be applicable though. Thanks Sent from my phone On Feb

Re: java.util.UUID.fromString performance

2012-02-28 Thread Alan Bateman
On 28/02/2012 14:26, Vitaly Davidovich wrote: Hi all, I noticed that this method could be made a bit more performant by: 1) creating a statically initialized Pattern for "-" and then calling split() on that. Currently the method calls name.split() which compiles the pattern on each invocation.

java.util.UUID.fromString performance

2012-02-28 Thread Vitaly Davidovich
Hi all, I noticed that this method could be made a bit more performant by: 1) creating a statically initialized Pattern for "-" and then calling split() on that. Currently the method calls name.split() which compiles the pattern on each invocation. 2) use Long.parseLong() instead of Long.decode