2013年5月23日星期四

Solidot: asm.js:Moazilla在Web上实现接近原生的性能

Solidot

奇客的资讯,重要的东西

asm.js:Moazilla在Web上实现接近原生的性能
http://solidot.org.feedsportal.com/c/33236/f/556826/s/2c4bbb6b/l/0L0Ssolidot0Borg0Cstory0Dsid0F34842/story01.htm
May 23rd 2013, 10:08

拜JIT(just-in-time)编译所赐,过去几年,JavaScript程序的性能有了显著的提升,但与C和C++编写的原生应用相比,仍然存在极大的差距。问题的根源在于JavaScript语言本身,JavaScript在设计时并没有考虑到高性能优化。与其改变JS不如创造一门新语言,Google因此发布了语法类似JS但更容易优化的脚本语言Dart。但从实践角度看,让开发者接受一门全新的语言需要时间,JS尚能饭否,引入新语言反而增加了复杂性。Mozilla提出了不同的方法,它不是创造新语言而是定义了一个JavaScript子集 asm.js,避开了JavaScript中大量难以优化的动态功能,没有面向对象结构,特性更少但更容易优化。Ars Technica的测试显示,asm.js确实能实现接近原生的性能。目前asm.js已进入了Firefox的beta渠道,大约六周之后Firefox用户将能使用支持asm.js的稳定版本。但它面临的问题是只有Firefox支持asm.js,Google只是表达了兴趣,还没开始动手。This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html



You are receiving this email because you subscribed to this feed at http://blogtrottr.com

If you no longer wish to receive these emails, you can unsubscribe here:
http://blogtrottr.com/unsubscribe/cz0/jPbdSR

没有评论:

发表评论

博客归档