Raw Power
I rewrote the java based rasterizer that is used in the X peers of GNU Classpath. Heres some interesting numbers. Rendering a relatively complex shape (actually, the outline of a glyph vector) 250 times takes:
- ~60ms on JDK1.5
- ~780 ms on Cacao with the Cairo peers
- ~350 ms on Cacao with the X peers and the new Rasterizer
Learned lesson: native code is not necessarily faster than java code. The whole rendering pipeline of the X peers is implemented in plain java. X only draws horizontal lines here.
The comparison with the JDK is not necessarily fair but gives an interesting impression what should be possible.
Find the test program here. Yes it is a microbenchmark that highlights one particular case (rendering complex shapes). I will make more interesting and comprehensive benchmarks as soon as I am able to run the Java2D and AWT benchmarks that ship with GNU Classpath.
January 2nd, 2007 at 1:53 am
[…] Some more numbers for you as followup to my last measurements: […]