Array Reverse Example
This page will show the miniboxing plugin speeding up a method reversing arrays. The example relies on the example sbt project and assumes you will execute the commands in the scala interpreter.
For the benchmark, we reverse a 10M integer array, and compare the performance of the generic version and the miniboxed version. You get 4-9x speedups by adding a single
To run the benchmark, start by cloning the miniboxing-example project and running the Scala interpreter console:
Then insert the following code in the console:
Finally, you can run the benchmark:
Depending on the size of the heap memory given to
sbt, the performance gains can be 4-9x with a single
@miniboxed annotation added in the right place. :)
Comments are always welcome! But to make the best use of them, please consider this:
- If you have questions or feedback regarding the content of this page, please leave us a comment!
- If you have general questions about the miniboxing plugin, please ask on the mailing List.
- If you found a bug, please let us know on the github issue tracker.
Thanks! Looking forward to your messages!
comments powered by