demo · v136

Compile Hints

Load the same script twice as a Blob — once with no hint, once with the //# allFunctionsCalledOnLoad magic comment. Both are run, both are timed, and the source is shown.

Magic comments are silent. If V8 sees them, the only signal is subsequent import speed.
no hint — total time
with magic comment
difference

source (without hint)

source (with magic comment — line 1)

the code

//# allFunctionsCalledOnLoad
export function fmt(n) { return n.toFixed(2); }
export function greet(s) { return "hello, " + s; }

see also