Internal vs External

Benchmark created on


Description

Hah, like I'd know the technical names of what I'm testing1

Preparation HTML

<script>
  function factorial(input) {
    return (input === 0) ? 1 : (input * factorial(input - 1));
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
External
var pollutingVariable = "basdflkjdfoisu";
var pollutVar = 2;

factorial(20);
ready
Internal
var pollutingVariable = "basdflkjdfoisu";
var pollutVar = 2;

function factorial2(input) {
  return (input === 0) ? 1 : (input * factorial(input - 1));
}
factorial2(20);
ready

Revisions

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