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. If you are in a hurry, watch the shorter version of the same presentation.
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 left and the modified to the right.
Demo 2: Approximate sound
We now show two frequency sweeps generated using JSyn. The first one is generated using a version of JSyn compiled with the non-modified version of the Java Server Compiler, while the second swept is generated using the same version of Jsyn using the modified version of the Server Compiler (C2) that includes our optimization.