benchmark.js
benchmark.js copied to clipboard
Strict mode
I would like to use strict mode in my benchmark functions. (E.g. so that I can use let
).
The "use strict";
statement must be the first statement of a function. I can not activate strict mode because of the compilation performed by this library (unless I use closures or move everything to an external function).
Would it be a good idea to add a Benchmark
option for strict mode?
You could aways test functions that are in strict mode.
Yes, that is already happening ;).
My intention is to be consistent with the rest of the code base. (strict mode everywhere, no more var
, etc). Not a high priority feature, but it would be nice to have (I'm willing to whip up a PR).
I can dig it. PR's away!