Hi Claes,

sorry for the delay, I didn't catch you message before, because you CC'd me which causes that my email filter misses the ListID tag to catch.

Thanks for the update, times change with the compact strings feature.

Another approach could be to access the String constant via Unsafe.

-Ulf


Am 30.01.2018 um 11:12 schrieb Claes Redestad:
Hi,

not sure what you're suggesting, exactly, but it seems Charset coders generate String literals which are then unpacked to char[]/byte[]'s in static blocks.

While constructing arrays from String literals might have been a startup
optimization in the past, it is now mainly a workaround to method bytecode
limits, see https://bugs.openjdk.java.net/browse/JDK-8185104

/Claes

On 2018-01-30 01:10, Ulf Zibis wrote:
Hi,

you may can construct the lookup table as a static String constant to slim down the footprint and treat it as a byte[] as we do in the Charset coders.

-Ulf


Am 29.01.2018 um 22:04 schrieb Claes Redestad:
I'll experiment and analyze a bit more tomorrow to see if I can find a
good explanation for the observed difference and/or a solution that
allows us to slim down the lookup array.




Reply via email to