Local variable vs outer scope variable

Benchmark created on


Setup

let outer = 0;

function f1() {
  let inner = 0;
  inner++;
}

function f2() {
  outer++;
}

Test runner

Ready to run.

Testing in
TestOps/sec
Inner scope
f1()
ready
Outer scope
f2()
ready

Revisions

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