Posted by dfoster
on April 7, 2009 at 10:50 PM PDT
While profiling some code that resizes images I discovered that ~94% of the code's time is spent in sun.java2d.loops.TransformHelper.Transform(MaskBlit, SurfaceData, SurfaceData, Composite, Region, AffineTransform, int, int, int, int, int, int, int, int, int, int, int, int). A native method. Since I have the source I started reading through the C code of this method. Eventually I arrived at line 428 and read the following comment:
/* Note that on x86 Linux the choice of best algorithm varies
* depending on the compiler optimization and the processor type.
* Currently, the sun/awt x86 Linux builds are not optimized so
* all the variations produce mediocre performance.
* For now we will use the choice that works best for the Windows
* build until the (lack of) optimization issues on Linux are resolved.
Since this code will be deployed on x86 Linux and it's also the platform I'm developing on I would like to know how do I best recompile the code so as to maximize its performance on x86 Linux?
BTW, I'm running:
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)