严格的说WebKit仅仅是个浏览器核心,采用该核心的浏览器很多,如国内的搜狗浏览器,遨游浏览器。其他的如google的chrome(Windows平台,linux平台下为chromium),epiphany(linux平台下,gnome2.28版本之后),苹果的Safari 都采用了webkit的内核。Firefox则是采用Gecko的内核,这是NetScape公司开发的内核,后来开源,mozilla继续开发。另外,现在还有另外两种常见的浏览器内核,Trident主要用在IE系列上,Presto主要用在Opera上。

这篇文章仅仅针对浏览器处理JavaScript的性能作比较,主要在X86平台和龙芯平台。先来解释一下JavaScript,JavaScript是互联网内较为常用的脚本语言,面向对象,主要在浏览器内解释执行,用于生成动态网页,因为很多语言特性受Java影响,所以叫JavaScript。通过JavaScript,浏览器可以运行服务器想要在访问者终端上运行的一些计算程序,以达到更好的浏览体验。 Continue reading »

 
  • 啥是nanojit?

Javascript的JIT后端,原先firefox直接使用javascript解释器,效率比较低。nanojit可以将频繁执行的javascript代码直接翻译为机器码执行,效率更高,性能更好。详细的介绍可以参看这篇文章:an overview of TraceMonkey,  (我是中国人,我要看中文 ).本博还有一篇英文介绍,自己的蹩脚英语拙作。确实闲着无聊可以猛击这里

  • 咋又蹦出来个tracemonkey?

这得先从spidermonkey说起,spidermonkey是firefox里的Javascprit解释器。因为增加了Nanojit,这种通过跟踪(trace)热JAVAscript代码的JIT。所以改名叫tracemonkey。

  • 我只关心这个firefox!

那就从这个地址下载吧,firefox_release.mips1-1_mipsel.deb. 下载之后切换到root帐号或者直接执行。注意目前Nanojit只测试了O32的龙芯,龙芯默认的操作系统和其他Debian衍生系统都能使用(目前测试了debian-en和Rays,没有问题).目前2E和2F的机器都能使用。N32的gentoo系统还不支持。 Continue reading »

 

SpiderMonkey is the JavaScript VM embedded in Mozilla firefox . TraceMonkey is a  scheme in SpiderMonkey to turn some JavaScript hot code to native instructions in order to make it run fast. It was been developed by Andreas Gal etc in mozilla and the paper about it was published on PLDI,2009. The paper was named :Trace-based Just-in-Time Type Specialization for Dynamic Languages.

TraceMonkey simply identifies loop back edges and do the optimization only on loops.  every loop back edge is a potential trace point.The loop becomes hot on its second iteration,so TraceMonkey records the code along the trace in a low-level compiler intermediate representation LIR(In Nanojit, LIR is the source language for compilation to machine code. LIR stands for low-level intermediate representation.) .TraceMonkey stops recording when execution returns to the loop header or exits the loop.After recording is finished,TraceMonkey compiles the trace to native code using the recorded type information for optimization.These code can be entered if the interpreter PC and the types of values match those observed when trace recording was started. Continue reading »

2009-2011© 编译点滴 Suffusion theme by Sayontan Sinha

无觅相关文章插件,快速提升流量