如何检测TraceMonkey?
是否可以检测到 Firefox 浏览器正在运行 TraceMonkey JavaScript 解释器?如果可以的话,可以用 JavaScript 来实现吗?涉及检查浏览器二进制文件或共享库的解决方案对我来说也可以。我现在正在运行 Linux 和 Firefox 3.0.14。
Is it possible to detect that a Firefox browser is running the TraceMonkey JavaScript interpreter? If so, is it possible to do it with JavaScript? A solution which involves examining the browser binary or shared libraries is also OK for me. I'm running Linux with Firefox 3.0.14 right now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过查看以下内容来检查它是否已启用:
javascript.options.jit.chrome ->对于浏览器 UI 和插件
javascript.options.jit.content ->对于网页内容
(您也可以更改值)
顺便说一句。如果你的代码有点复杂,不要期望获得与 V8 相当的速度。 Tracemonkey 因分支代码而失败(它可能比 Spidermonkey 慢)。
更多信息:http://hacks.mozilla.org/2009/07/tracemonkey-概述/
you can check if it's enabled by looking at:
javascript.options.jit.chrome -> for browser UI and plugins
javascript.options.jit.content -> for web content
(you can also change the values)
btw. if your code is a little complex don't expect to get a speed comparable to V8. Tracemonkey fails with branchy code (it may be slower than spidermonkey).
More info: http://hacks.mozilla.org/2009/07/tracemonkey-overview/
所以,3.0 没有 Tracemonkey,并且关于您的评论,在 3.5 中它也不起作用 - 您是否可能运行发行版提供的 64 位?我记得读过,tracemonkey 在 64 位版本上被禁用(该支持最近才实现,并且不在 Firefox 3.5 中)。
So, 3.0 doesn't have tracemonkey, and regarding your comment that in 3.5 it doesn't work either - are you maybe running distro-provided 64-bit? I recall reading that tracemonkey was disabled on 64-bit builds (the support was implemented only recently and is not in Firefox 3.5).