Hacker Newsnew | past | comments | ask | show | jobs | submit | PartOSolution25's commentslogin

Any news on the performance impact of the new trait encoding [1] , [2]?

[1] http://www.scala-lang.org/blog/2016/07/08/trait-method-perfo...

[2] https://bugs.openjdk.java.net/browse/JDK-8161334


If I remember correctly, for 2.12 the compiler will generate additional forwarder methods, which mitigates the performance issues, but increases file size again.

It's still a lot smaller than 2.11, but for instance the standard library of 2.12.0-RC1 was 900kB smaller than 2.12.0.


The blog entry doesn't mention the impact of that performance regression on Scala 3 (aka Dotty).


Sure, but Dotty is like hindsight, (arriving the year) 2020.

Regardless, there's a significant performance regression to sort out prior to the 2.12 GA. If it is a JVM limitation it won't be solved until at least Java 9 (according to the fix version listed in the bug report), which will mean 2.12 loses one of the stated goals of the release: reduction in number of generated class files (with perhaps slightly faster build times).

Anyway, we'll see in the coming weeks/months if a resolution or workaround manifests.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: