Strange speed dependency; help needed for benchmark, please

Christian Thalinger Christian.Thalinger at Sun.COM
Wed Feb 4 23:55:53 PST 2009


On Wed, 2009-02-04 at 20:50 +0100, Ulf Zibis wrote:
> Hi,
> 
> I experience very much different mutually contradictory times running my 
> UTF-8 benchmark 
> https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/trunk/test/sun/nio/cs/UTF_8Benchmark.java?diff_format=s&rev=620&view=markup
> for only 1 code unit pattern _against_ running for all code unit patterns:
> 
> selected pattern 4
> time for sun.nio.cs.UTF_8_60$Decoder: 2851 ms
> time for sun.nio.cs.UTF_8_70$Decoder: 2501 ms
> time for sun.nio.cs.UTF_8_last$Decoder: 2310 ms
> time for sun.nio.cs.UTF_8_new$Decoder: 2048 ms

This is solaris-amd64:

$ gamma -Xbootclasspath/a:. sun/nio/cs/UTF_8Benchmark
time for warm up 1: 2455 ms
time for warm up 2: 1150 ms
time for warm up 3: 1151 ms
time for warm up 4: 1180 ms
time for sun.nio.cs.UTF_8_60$Decoder: 1553 ms
time for sun.nio.cs.UTF_8_70$Decoder: 836 ms
time for sun.nio.cs.UTF_8_last$Decoder: 746 ms
time for sun.nio.cs.UTF_8_new$Decoder: 943 ms
last warm up ./. test loops: 1.1573023

> 
> selected all patterns (SRC_BUF = -1)
> time for sun.nio.cs.UTF_8_60$Decoder: 4951 4925 5351 4531 5269 4686 ms
> time for sun.nio.cs.UTF_8_70$Decoder: 476 3066 4815 3921 4907 3369 ms
> time for sun.nio.cs.UTF_8_last$Decoder: 560 3237 4539 4575 4772 3334 ms
> time for sun.nio.cs.UTF_8_new$Decoder: 531 3642 4741 4462 5497 3742 ms

$ gamma -Xbootclasspath/a:. sun/nio/cs/UTF_8Benchmark
time for warm up 1: 3942 ms
time for warm up 2: 2394 ms
time for warm up 3: 2409 ms
time for warm up 4: 2388 ms
time for sun.nio.cs.UTF_8_60$Decoder: 859 854 2134 1694 2049 1044 ms
time for sun.nio.cs.UTF_8_70$Decoder: 290 781 1933 1448 2010 900 ms
time for sun.nio.cs.UTF_8_last$Decoder: 414 681 1462 1452 1524 765 ms
time for sun.nio.cs.UTF_8_new$Decoder: 396 686 2291 1500 1760 876 ms
last warm up ./. test loops: 1.9226139

> Also I experience significant differences, when I change the 
> chronological order of the tested decoders, see line 29... :
>         int dec = 0; // change process order of decoders for different 
> results:
>         decoders[dec++] = new UTF_8_60().newDecoder();
>         decoders[dec++] = new UTF_8_70().newDecoder();
>         decoders[dec++] = new UTF_8_last().newDecoder();
>         decoders[dec++] = new UTF_8_new().newDecoder();

$ gamma -Xbootclasspath/a:. sun/nio/cs/UTF_8Benchmark
time for warm up 1: 2569 ms
time for warm up 2: 1140 ms
time for warm up 3: 1143 ms
time for warm up 4: 1176 ms
time for sun.nio.cs.UTF_8_new$Decoder: 745 ms
time for sun.nio.cs.UTF_8_60$Decoder: 1536 ms
time for sun.nio.cs.UTF_8_last$Decoder: 1001 ms
time for sun.nio.cs.UTF_8_70$Decoder: 747 ms
last warm up ./. test loops: 1.166911

$ gamma -Xbootclasspath/a:. sun/nio/cs/UTF_8Benchmark
time for warm up 1: 4145 ms
time for warm up 2: 2598 ms
time for warm up 3: 2606 ms
time for warm up 4: 2651 ms
time for sun.nio.cs.UTF_8_new$Decoder: 388 1822 1210 1368 912 1775 ms
time for sun.nio.cs.UTF_8_60$Decoder: 738 733 2558 1988 2203 1035 ms
time for sun.nio.cs.UTF_8_last$Decoder: 421 685 2154 1967 1731 844 ms
time for sun.nio.cs.UTF_8_70$Decoder: 289 781 2364 1444 2010 947 ms
last warm up ./. test loops: 1.9654278

Hope that helps.

-- Christian




More information about the hotspot-compiler-dev mailing list