RFR: 8196331: Optimize Character.digit for latin1 input

Claes Redestad claes.redestad at oracle.com
Mon Jan 29 11:15:38 UTC 2018


for the latin1 block of CharacterData we can improve the
digit(int, int) implementation by providing an optimized lookup
table. This improves microbenchmarks exercising Integer.parseInt,
Long.parseLong and UUID.fromString etc by around 50%for typical

Webrev: http://cr.openjdk.java.net/~redestad/8196331/open.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8196331

The lookup array is pre-calculated to minimize startup impact
(adds 1,027 bytecodes executed during initialization)


More information about the core-libs-dev mailing list