stacktrace generation

JavaScript performance comparison

Test case created by IgorMinar

Info

does delayed access to stack trace matter?

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
create error and touch stack property
var error = new Error();

if (!error.stack) throw new Error("Rats! No stack trace!");
pending…
create error, catch it and touch stack property
var error
try {
  throw new Error();
} catch(e) {
  error = e;
}

if (!error.stack) throw new Error("Rats! No stack trace!");
 
pending…
grab error and touch stack via type error
var error
try {
  0(); // intentional type error
} catch(e) {
  error = e;
}

if (!error.stack) throw new Error("Rats! No stack trace!");
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment