Anders - thanks for the pointer. This helped me to discover what is happening.
In short - java1.4.2b1 sucks.
Longer story - when I have run VertexArrayRange with java 1.4.0_something, I have 30 fps. It might be something like 29.5 compared to 30.5 with nvidia version, but difference is neglible. With -client instead of -server, fps is 26-27 - still acceptable.
It seems that java1.4.2b1 buffer access has suffered from serious regression.
Raw data for you:
|JVM||Float array||Direct buffer|
While normal array performance has improved considerably, direct buffer was killed. Especially look at server - from 13 to 880 !!!!
You can get test program from link provided by Anders - use my corrected version to get above results. Program will claim that unit is uS, but I'm not sure about it - anyway, it is some kind of time per unit of work, not important how much it is absolutely, important is that it is computed in same way in both cases and can be compared in relative manner.
I can look at bugparade and file a performance regression bug, but then it will be good if it will get fixed in 1.5... Maybe some of Sun insiders here can check what is really happening and bug one of Hotspot engineers about that ?
Cas, would it be possible that you test this code with jet ? Of course, you would need to rerun it with normal java, to get base result on your computer - but I wonder how well jet is able to optimize this stuff.
Download and run. I have tried to find number of iterations which is still meaningful under 1.4 and bearable to wait for under 1.4.2b1.