mathiasbynens / jsperf.com

jsPerf.com source code
http://jsperf.com/
Other
473 stars 56 forks source link

Suggestion: Ability to add an external variable #243

Closed torvalamo closed 9 years ago

torvalamo commented 9 years ago

Specifically I have this need when running different tests on arrays of different sizes, and it's really tedious to edit the setup code (and go through the captcha) to try different array sizes...

So what I'd want is the ability to read external variables. Like

jsperf.com/mytests/?size=5000

In setup code:

var size = parseInt(external.size) || 1000

Or maybe as a "fill in" form on the page itself, so no reload is necessary.

If it's implemented, it would probably only make sense to allow it in the setup code.

mathiasbynens commented 9 years ago

No new core functionality is needed for this. See https://jsperf.com/hasownproperty-vs-for-in#c200 for an example.