Hi, 
reading the changelog I saw that many things changed about stacktrace 
generation in the recent V8 versions, which should change the performance 
of generating the error instance?
I've tried this simple test with arangodb's arangosh and its embedded V8 
versions 7.1 and 7.9: 

function test1() {
  function test2() {
    function test3() {
      function test4() {
        function test5() {
          function test6() {
            function test7() {
              function test8() {
                x= new Error;
                return 1;
              }
              return test8();
            }
            return test7();
          }
          return test6();
        }
        return test5();
      }
      return test4();
    }
    return test3();
  }
  return test2();
}

before = time();
for (let i = 1; i < 50; i ++) {
  test1();
}
print(time() - before);


7.1:  - (as in ArangoDB 3.6) 0.0012750625610351562
7.9: - (as in current devel) 0.6016845703125

The figures are similar when I throw the error and catch it inside that for 
loop. 
I've read that later V8 reparses the source in order to get the printeable 
stacktrace; is this what gives such a worse performance here? 
If yes, which way is one to achieve similar / faster performance with 
recent V8 versions?

Cheers, 
Willi

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/f27ad537-86c5-4f3e-be8c-b25b73dea7af%40googlegroups.com.

Reply via email to