Error.stackTraceLimit

Benchmark created on


Description

Test the impact of setting higher Error.stackTraceLimit value

Setup

    function loop(depth) {
      if (depth > 1) {
        return loop(depth - 1);
      }

      return new Error().stack;
    }

    function foo(depth = 100) {
      return loop(depth - 2)
    }

Test runner

Ready to run.

Testing in
TestOps/sec
default
foo()
ready
with Error.stackTraceLimit
Error.stackTraceLimit = Infinity;
foo()
ready

Revisions

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