Many of the optimizations I'm trying have a relatively small improvement. That can make it hard to tell if they are actually an improvement if there is enough variance in the runs that they are lost in the noise.
AOT builds don't need warm-up time and seem to have generally lower variance than JIT runs. Also, they are how the shipped formatter is run in dart format. So this adds support to the two benchmark scripts for running themselves in AOT snapshot mode.
I added support for this directly to the scripts instead of just manually compiling and running them on the command line (which works fine) because this way it's less error-prone. I don't have to remember to re-compile the AOT snapshot and risk using an old build which is an easy mistake to make when the only behavioral difference is (possibly) performance.
Many of the optimizations I'm trying have a relatively small improvement. That can make it hard to tell if they are actually an improvement if there is enough variance in the runs that they are lost in the noise.
AOT builds don't need warm-up time and seem to have generally lower variance than JIT runs. Also, they are how the shipped formatter is run in
dart format
. So this adds support to the two benchmark scripts for running themselves in AOT snapshot mode.I added support for this directly to the scripts instead of just manually compiling and running them on the command line (which works fine) because this way it's less error-prone. I don't have to remember to re-compile the AOT snapshot and risk using an old build which is an easy mistake to make when the only behavioral difference is (possibly) performance.
Also, tweaked the profiler output a little.