loop variable scope performance

Benchmark created by Shane Tomlinson on


Description

Check to see the speed of various variable declarations in a loop

Test runner

Ready to run.

Testing in
TestOps/sec
declared inside for body
for (var i = 0; i < 10; ++i) {
 var j = 0;
 true;
}
ready
declared in for
for (var i = 0, j = 0; i < 10; ++i) {
 j = 0;
 true;
}
ready

Revisions

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

  • Revision 1: published by Shane Tomlinson on