EUC-TW Decoder up to 100% faster, especially on ASCII on JDK-7 -server

Ulf Zibis Ulf.Zibis at gmx.de
Thu Aug 20 14:30:35 UTC 2009


Hi Sherman, Martin and all,

I have found a way, how to speed-up charset decoders in a general way. 
In case of EUC-TW it does speed-up to 100 % (on ASCII on JDK-7 -server)

Here the output of my benchmark:
(see code: 
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/test/sun/nio/cs/ext/EUC_TWBenchmark.java)

java.version : 1.7.0-ea
java.vm.version : 16.0-b07
time to instantiate EUC_TW_xueming: 8716 µs
time to instantiate EUC_TW_int: 4802 µs
time to instantiate EUC_TW: 2819 µs
time to instantiate EUC_TW_ASCII_inl: 4806 µs
time to init decoder EUC_TW_xueming: 5873 µs
time to init encoder EUC_TW_xueming: 33726 µs
time to init decoder EUC_TW_int: 6618 µs
time to init encoder EUC_TW_int: 25075 µs
time to init decoder EUC_TW: 5404 µs
time to init encoder EUC_TW: 21776 µs
time to init decoder EUC_TW_ASCII_inl: 7827 µs
time to init encoder EUC_TW_ASCII_inl: 24514 µs
time to instantiate TestEUC_TW: 3075 µs
time for warm up 1: 608 ms
time for warm up 2: 470 ms
time for warm up 3: 496 ms
time for warm up 4: 487 ms
time for       EUC_TW_xueming ASCII decode: 505 ms
time for           EUC_TW_int ASCII decode: 282 ms
time for               EUC_TW ASCII decode: 255 ms
time for     EUC_TW_ASCII_inl ASCII decode: 303 ms
time for       EUC_TW_xueming Plane0 decode: 687 ms
time for           EUC_TW_int Plane0 decode: 623 ms
time for               EUC_TW Plane0 decode: 632 ms
time for     EUC_TW_ASCII_inl Plane0 decode: 621 ms
last warm up ./. test loops: 1.2456994

-Ulf





More information about the core-libs-dev mailing list