Approximate Loop Unrolling (A-Roll) is an approximate loop optimization that transforms loops in a similar way Loop Unrolling does. However, unlike its exact counterpart, A-Roll unrolls by adding interpolations of the loop’s body, rather than exact copies. The objective of the optimization is to increase the loop’s speed while reducing its size and the power consumption needed to obtain a result. We have currently implemented the optimization in the Server Compiler of the OpenJDK Hostpot VM.
We have described our optimization and implementation in a 4 pages document that you can download from here.
Talk describing A-Roll
The following presentation describes the optimization, gives details on the implementation and provides several demos showing the results of programs optimized using A-Roll.
Demo 1: Keep Unrollin’ Babe
We encoded Rollin’ from Limp Bizkit using JCodec. We compiled JCodec using the original version of the Java Server (C2) compiler and the version that included our optimization. As result, the version of JCodec compiled using the modified version of the C2 was able to encode the video 20s faster. This video shows a comparison of both, the original to the right and the modified to the left.