scala performance

Since version 6 update 14, the JVM has a feature called escape analysis: If the JVM sees that an object is created just for the scope of a single method (e.g., StringBuilder), it can decide not to create it and instead use the fields as local variables.


This is good for Java, but especially for Scala, since many of Scala's features are implemented by creating wrapper objects (implicit conversions, call-by-name). Performance improves from 11% ( Some people suggest a 25% improvement in performance