var in window vs. window.var

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
var in window
var m;
for(var i = 0; i < 10000; ++i){
   m = ('ontouchstart' in window);
};
ready
window[var]
var m;
for(var i = 0; i < 10000; ++i){
   m = window['ontouchstart'];
};
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.