Jim, Did you have a look to the latest webrev? Or you expect me to send a new one without FastMath ?
Dalibor, I tested quickly and StrictMath is not fast enough. I will find another solution to efficiently ceil (float)... Cheers, Laurent Le 23 mars 2015 17:18, "Laurent Bourgès" <bourges.laur...@gmail.com> a écrit : > Jim, > > Here is the new webrev: > http://cr.openjdk.java.net/~lbourges/marlin/marlin.4/ > > Changes: > - Fixed line lengths to 80 chars > - Fixed / removed single-line "/** short comment */" > - Fixed Unsafe access > - Use PhantomReference / ReferenceQueue and the new OffHeapDisposer thread > to free off-heap memory to avoid finalization in Renderer > - added the ArrayCachesHolder class in RendererContext to gather all > ArrayCache instances: use it wrapped using a WeakReference to reduce the > memory footprint of large array caches > - Use AccessController.doPrivileged(new GetPropertyAction(key)) to > properly get System properties in a secure environment in > MarlinRenderingEngine > > I hope this patch is now good enough to be pushed into the graphics > rasterizer project. > > PS: I tested again using weak references for RendererContext (TL storage) > using -Dsun.java2d.renderer.useRef=weak and it is working well: maybe I > should use this mode by default instead of SoftReferences (better memory > footprint): to be benchmarked and discussed... > > First results (JDK8) with WeakReference seems as good as using > SoftReference (very minimal GC overhead): > Tests 27 9 9 9 > Threads 4 1 2 4 > Pct95 132.155 130.149 130.757 135.558 > > Regards, > Laurent > >