-
Enhancement
-
Resolution: Fixed
-
P4
-
10
-
b22
java.net.URI and sun.net.www.ParseUtil create invariant mask constants at static initialization time. Since these call out to static methods, the value evaluation is not constant folded at javac compile time leading to unnecessary code execution during bootstrap.
Additionally the dependency on java.util.BitSet in ParseUtil can be replaced by a low+high mask, which actually shows as a small (<5%) throughput improvement on microbenchmarks for inputs where this path is taken.
Manually calculating the constant values reduces bytecode executed by almost 15.000 and avoids loading java.util.BitSet early in bootstrap.
Additionally the dependency on java.util.BitSet in ParseUtil can be replaced by a low+high mask, which actually shows as a small (<5%) throughput improvement on microbenchmarks for inputs where this path is taken.
Manually calculating the constant values reduces bytecode executed by almost 15.000 and avoids loading java.util.BitSet early in bootstrap.