Firefox、Chrome、Safari、IE 等的 js 递归限制是什么? [英] What are the js recursion limits for Firefox, Chrome, Safari, IE, etc?

查看:40
本文介绍了Firefox、Chrome、Safari、IE 等的 js 递归限制是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些使用相当深的递归的 Javascript 代码,我想找出各种浏览器中的递归限制是什么(即会发生递归过多"错误的点).

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?

推荐答案

Nicholas C. Zakas 在他的博客中写道:

  • 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.

我创建了一个 Browserscope 测试来获取更多数据.请在此处运行.

I've created a Browserscope test to get more data. Please run it here.

以上结果现已过时,但浏览器范围结果已更新:

The results above are now obsolete, but the browserscope results are updated :

  • IE 11:12,064
  • Firefox 65:20,614
  • Chrome 72:9,643
  • 歌剧 57:9,638
  • Safari 12:32,035

这篇关于Firefox、Chrome、Safari、IE 等的 js 递归限制是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆