Learn all about miniboxing in a 5 minute demo.


Welcome


Miniboxing is a program transformation that improves the performance of Scala generics when used with primitive types. It can speed up generic collections by factors between 1.5x and 22x, while maintaining bytecode duplication to a minimum. You can easily add miniboxing to your sbt project.


Why use Miniboxing?

Performance The miniboxing plugin improves generics performance and has been tested on linked lists, vectors, streams, image processing and other examples.

Advisories Miniboxing issues actionble performance advisories while compiling the code, so programmers know what they need to do to improve the performance of their code.

Integration The miniboxing transformation reuses the machinery in the Scala compiler, so it can easily and reliably integrate with existing tools, such as the Scala IDE and the IntelliJ Scala plugin.

Disclaimer

Please keep in mind that the miniboxing plugin is a beta release, and you may encounter occasional hickups as we are working towards a feature-complete and super-stable implementation.

We are doing our best to make miniboxing a stable transformation, with nightly builds and hundreds of test cases running every night. Yet, there are bugs we haven't fixed yet, so don't be surprised if the plugin fails on some programs. But please do file bugs for such failures, so we can fix them asap! (on average, we fixed a bug every 3 days for the last two months!)

The miniboxing release currently supports two specific versions of the Scala compiler: paper

  • 2.11.7, the current release in the 2.11 series and
  • 2.10.6, the current release in the 2.10 series

Due to compiler bugs (for the 2.10 series) and binary incompatibility of the compiler API (for the 2.11 series), we do not currently support the other versions. We are planning, however, to fully cross-compile against all 2.10 and 2.11 versions and to provide error messages for the earlier and unsupported versions of the Scala compiler. We're sorry for this, but the engineering effort in supporting even two versions of the compiler is significant!