That's correct. Streaming compilation would finish earlier, but might actually benchmark more slowly because you'd be adding in the time that the compiler is idle and waiting for the network to catch up.
Preloading the .wasm file in the test lets us measure just the speed of the compiler, independent of the network.
Even though I'd prefer to use Firefox I tend to stick with Safari due to the battery life advantage which really shows when you open a lot of tabs.
I believe I could summarize things by saying the only way you can really save energy* doing the same work+ is by using a different semiconductor process (either power/leakage-reduction-focused or smaller).
* For serious values of "energy"
+ Where the same work is not always true for a given task, if one optimizes an algorithm
P = V * I
But, I = V / R
So, P = V * (V / R)
= V^2 / RThat's not the primary cause of the power = frequency^2 rule, but actually adds a factor on top of that.
Chrome: WebAssembly.instantiate took 12935.5 ms (1 MB/s)
Firefox Nightly: WebAssembly.instantiate took 1223.1 ms (10.1 MB/s)
Yikes, one order of magnitude in difference.
FF: WebAssembly.instantiate took 280.3 ms (44.2 MB/s)
Chrome: WebAssembly.instantiate took 3022.4 ms (4.1 MB/s)
Chrome: WebAssembly.instantiate took 13692.8 ms (0.9 MB/s)
Firefox: WebAssembly.instantiate took 330.8 ms (37.4 MB/s)
This is on MacOS 10.13.2. I'd love to run Firefox but the battery savings and reduced heat from using Safari makes it too hard to pass up in this regard.
Firefox Nightly: WebAssembly.instantiate took 158.2 ms (78.3 MB/s)
Edge 41.16299.15.0: WebAssembly.instantiate took 99.2 ms (124.8 MB/s)
I did not expect Edge to be even faster.
Nightly:WebAssembly.instantiate took 1825.3ms (6.8mb/s)
Mine was a laptop in low power mode. Yours was much faster all around.
Firefox 57: 5053.8 ms (2.4 MB/s)
Firefox Nightly 59: 454.6 ms (27.2 MB/s)
Chrome 63: 9034.9 ms (1.4 MB/s)
Wow, it's over x10 faster...
The repo itself is at https://github.com/lukewagner/test-tanks-compile-time
In Safari 11.0.2 I get: WebAssembly.instantiate took 2885.9 ms (4.3 MB/s)
In Vivaldi 1.13.1008.40 I get: WebAssembly.instantiate took 7719 ms (1.6 MB/s)
Firefox Nightly: WebAssembly.instantiate took 227.6ms (54.4mb/s)
Chrome Canary: WebAssembly.instantiate took 8576ms (1.4mb/s)
Wow.
(Edit: And I believe that's not even using the streaming compilation mentioned in the article, it's just the new baseline compiler in action)