RFR: 8196334: Optimize UUID#fromString
Claes Redestad
claes.redestad at oracle.com
Fri Feb 28 14:22:52 UTC 2020
Hi all,
please review this patch to optimize UUID#fromString.
Jon Chambers originally proposed a patch that used a strict parser to
get a similar speed-up, but I failed to adapt it in a way that
could fall back to the less strict behavior while maintaining a
reasonable speed-up in the fast-path case. Sorry, Jon!
The patch proposed here was recently contributed by Andriy Plokhotnyuk
(OCA signed), and manages to get more than a 3x speed-up on the new
fromString microbenchmark, while falling back gently to the current,
less strict implementation if ever needed. I've done some light edits,
and added a simple microbenchmark.
Bug: https://bugs.openjdk.java.net/browse/JDK-8196334
Webrev: http://cr.openjdk.java.net/~redestad/8196334/open.00/
Testing: tier1-3
Thanks!
/Claes
More information about the core-libs-dev
mailing list