It’s pretty drastic, and has gotten more pronounced in recent JDK 9 builds. Running test programs from the issues linked in the Jira description there’s somewhere between 30% and 100% speedup from using anonymous classes.
Note that the intention has always been to use anonymous classes for short scripts, we just didn’t realize many users compile one-liners using the Java API. Hannes > Am 09.08.2016 um 11:24 schrieb Marcus Lagergren <mar...@lagergren.net>: > > Do you have any benchmark examples with better and worse results? > > Just curious > > /M > >> On 04 Aug 2016, at 13:48, Hannes Wallnöfer <hannes.wallnoe...@oracle.com> >> wrote: >> >> Please review 8162955: Activate anonymous class loading for small sources. >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8162955 >> Webrev: http://cr.openjdk.java.net/~hannesw/8162955/webrev/ >> >> The size threshold of 512 bytes I chose is arbitrary. It seems to fit all >> reported cases which consist of firing lots of one-liner scripts where quick >> loading is more important than optimization. >> >> Thanks, >> Hannes >