The discovery turned out to be a fluke.
The JSFiddle that demonstrated the so
called concurrency contains an error. When you enabled the
second heavy function by setting
because of the heavy function’s random nature, in some cases half way
through execution an error is raised
1 2 3 Error: invalid arguments this.spectrum = new Float32Array(bufferSize/2);
Because of this, the fact that the heavy function ran is not registered
in the output. So it appears that for three or four small functions only
one heavy function is run. This is not so. Both functions run one after
the other. It is just that the heavy function sometimes errors, and no
output for it is written.
In Chrome this behavior did not happen because either it allows arbitrary
first argument to
Float32Array function, or it sets the first argument
to some predefined maximum value.