All Projects → miniboxing → Miniboxing Plugin

miniboxing / Miniboxing Plugin

Licence: other
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:

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Miniboxing Plugin

Componentarrays.jl
Arrays with arbitrarily nested named components.
Stars: ✭ 72 (-32.08%)
Mutual labels:  arrays, optimization
Data Structures With Go
Data Structures with Go Language
Stars: ✭ 121 (+14.15%)
Mutual labels:  collections, arrays
Knowledgesummary
📚A list of core knowledge that most Android programmers need to know. (continuously updated...)
Stars: ✭ 131 (+23.58%)
Mutual labels:  jvm, optimization
php-collections
A collection library for php
Stars: ✭ 34 (-67.92%)
Mutual labels:  collections, arrays
Ojalgo
oj! Algorithms
Stars: ✭ 336 (+216.98%)
Mutual labels:  arrays, optimization
yarrow
[yarrow] JVMCI based optimizing compiler for HotSpot VM
Stars: ✭ 21 (-80.19%)
Mutual labels:  jvm, optimization
Staticvec
Implements a fixed-capacity stack-allocated Vec alternative backed by an array, using const generics.
Stars: ✭ 236 (+122.64%)
Mutual labels:  generics, collections
Awesome Seo
Google SEO研究及流量变现
Stars: ✭ 942 (+788.68%)
Mutual labels:  collections, optimization
Jplusone
Tool for automatic detection and asserting "N+1 SELECT problem" occurences in JPA based Spring Boot Java applications and finding origin of JPA issued SQL statements in general
Stars: ✭ 91 (-14.15%)
Mutual labels:  jvm, optimization
Dists
IQA: Deep Image Structure and Texture Similarity Metric
Stars: ✭ 101 (-4.72%)
Mutual labels:  optimization
Juniper.jl
A JuMP-based Nonlinear Integer Program Solver
Stars: ✭ 103 (-2.83%)
Mutual labels:  optimization
Heapothesys
Heapothesys /hɪˈpɒθɪsɪs/ is a heap allocation JVM benchmark developed by the Amazon Corretto team.
Stars: ✭ 100 (-5.66%)
Mutual labels:  jvm
Unreachable
Unreachable code path optimization hint for Swift
Stars: ✭ 101 (-4.72%)
Mutual labels:  optimization
Gurobi Python
Learning how to use gurobi with python (in chinese)
Stars: ✭ 104 (-1.89%)
Mutual labels:  optimization
Jvm Mon
Console-based JVM monitoring tool
Stars: ✭ 1,365 (+1187.74%)
Mutual labels:  jvm
Fast zlib
Heavily optimized zlib compression algorithm
Stars: ✭ 105 (-0.94%)
Mutual labels:  optimization
Advisor
Open-source implementation of Google Vizier for hyper parameters tuning
Stars: ✭ 1,359 (+1182.08%)
Mutual labels:  optimization
Monkeys
A strongly-typed genetic programming framework for Python
Stars: ✭ 98 (-7.55%)
Mutual labels:  optimization
Strategems.jl
Quantitative systematic trading strategy development and backtesting in Julia
Stars: ✭ 106 (+0%)
Mutual labels:  optimization
Grl
Robotics tools in C++11. Implements soft real time arm drivers for Kuka LBR iiwa plus V-REP, ROS, Constrained Optimization based planning, Hand Eye Calibration and Inverse Kinematics integration.
Stars: ✭ 105 (-0.94%)
Mutual labels:  optimization
Miniboxing Logo #Miniboxing Plugin for Scala

Miniboxing is a Scala compiler transformation that improves the performance of generics for primitive numeric types. Unlike specialization, miniboxing reduces the amount of generated bytecode without sacrificing execution speed, therefore being capable of transforming the Scala collections hierachy.

Check out the scala-miniboxing.org website.

Gitter Badge Travis Badge Codacy Badge Codecov Badge

##Why use Miniboxing?## Short answer: because it matches the performance of specialization, without the bytecode blowup. For the Tuple3 class:

case class Tuple3[@specialized +T1, @specialized +T2, @specialized +T3](_1: T1, _2: T2, _3: T3)

Specialization generates 1000 classes. Just change @specialized to @miniboxed and you get only 8 classes.

Long answer: Aside from reducing the bytecode size, the miniboxing technique improves several other aspects of specialization:

  • miniboxing-specialized classes don't inherit generic fields (see SI-3585);
  • miniboxing-specialized classes can inherit from their miniboxing-specialized parents (see SI-8405 and this restriction).

To see the benchmarks we performed, have a look at the OOPSLA 2013 paper we just prepared. They include performance evaluations, bytecode size comparisons and many more. Also, the docs directory contains a series of papers and presentations which explain many aspects of the miniboxing transformation.

Using the Plugin

At this point, the miniboxing plugin is not production-ready, although it can compile spire. However, we do publish a nightly maven artifact on Sonatype, so anyone can try the current transformation. To get started, have a look at the example project we prepared.

Mind the gap: there are still many bugs and known limitations, so you're in for a thrill! Also, don't hesitate to add bugs to the tracker, good reductions that can be easily reproduced are highly appreciated!

Hacking the Plugin

The wiki is a good place to start looking into installing, testing, benchmarking and hacking on the miniboxing plugin. Also have a look at the docs directory, which contains some good resources.

The development branches are:

  • master is always stable, usually outdated
  • wip is pretty stable, usually has the last resonably stable developments
  • topic/erasure-rebase contains the most recent developments, but expect tests to be broken most of the time

###Repository organization###

  • wip is the working branch, most current version of the plugin
  • master is usually a bit behind wip, but should be stable (alpha-stable, not production-ready!)
  • sbt is used for compilation and testing
  • the repository contains several sbt sub-projects:
    • components/plugin - the actual Scala compiler plugin
    • components/runtime - the runtime support for the transformed code
    • components/classloader - the classloader used for runtime class specialization
    • tests/benchmarks - the benchmarks for the project
    • tests/correctness - the tests for the plugin transformation
    • docs - documents released as the development goes on

##Questions?## If you have any question, you can contact me at vlad dot ureche at epfl dot ch.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].