views:

87

answers:

1

I've got some Javascript code which uses fairly deep recursion and I'd like to find out what the recursion limits in the various browsers are (i.e. the point at which the error "too much recursion" will happen).

Anyone have any solid numbers on this, by version?

+2  A: 

Nicholas C. Zakas writes in his blog:

  • Internet Explorer 7: 1,789
  • Firefox 3: 3,000
  • Chrome 1: 21,837
  • Opera 9.62: 10,000
  • Safari 3.2: 500

There's some more data on different browsers and OSs here: http://www.javascriptrules.com/2009/06/30/limitation-on-call-stacks/

Adam