Miniboxing - Reverse Example
This is an example of using the miniboxing plugin 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 @miniboxed
annotation:
scala> def reverse_gen[T](array: Array[T]): Unit = ...