{"id":2329,"date":"2013-05-24T12:17:06","date_gmt":"2013-05-24T16:17:06","guid":{"rendered":"http:\/\/blog.nccomputertech.com\/?p=2329"},"modified":"2013-05-24T12:17:06","modified_gmt":"2013-05-24T16:17:06","slug":"surprise-mozilla-can-produce-near-native-performance-on-the-web","status":"publish","type":"post","link":"https:\/\/nccomputertech.com\/techtalk\/2013\/05\/24\/surprise-mozilla-can-produce-near-native-performance-on-the-web\/","title":{"rendered":"Surprise! Mozilla can produce near-native performance on the Web"},"content":{"rendered":"<p style=\"text-align:center;\"><a href=\"http:\/\/arstechnica.com\/information-technology\/2013\/05\/native-level-performance-on-the-web-a-brief-examination-of-asm-js\/\"><img decoding=\"async\" alt=\"Surprise! Mozilla can produce near-native performance on the Web | Ars Technica\" src=\"http:\/\/nccomputertech.files.wordpress.com\/2013\/05\/hamster-powered.jpg\" \/><\/a><\/p>\n<p>In a bid to make JavaScript run ever faster, Mozilla has developed asm.js. It&#8217;s a limited, stripped down subset of JavaScript that the company claims will offer performance that&#8217;s within a factor of two of native\u2014good enough to use the browser for almost any application. Can JavaScript really start to rival native code performance? We&#8217;ve been taking a closer look.<br \/>\nThe quest for faster JavaScript<br \/>\nJavaScript performance became a big deal in 2008. Prior to this, the JavaScript engines found in common Web browsers tended to be pretty slow. These were good enough for the basic scripting that the Web used at the time, but it was largely inadequate for those wanting to use the Web as a rich application platform.<br \/>\nIn 2008, however, Google released Chrome with its V8 JavaScript engine. Around the same time, Apple brought out Safari 4 with its Nitro (n\u00e9e Squirrelfish Extreme) engine. These engines brought something new to the world of JavaScript: high performance achieved through just-in-time (JIT) compilation. V8 and Nitro would convert JavaScript into pieces of executable code that the CPU could run directly, improving performance by a factor of three or more.<br \/>\nMozilla and Microsoft followed suit. Mozilla introduced TraceMonkey in Firefox 3.5 in 2009 and Microsoft released Chakra in 2011.<br \/>\nJIT compilation provided great scope for accelerating the performance of JavaScript programs, but it has its limits. The problem is JavaScript itself. The behavior of the language makes it hard to optimize. In languages such as C and C++, the behavior of a program is baked in when the program is compiled. Languages like Java and C# add a little more flexibility, but most of the time they share that same characteristic. The functions and data that make up a particular class are fixed when the program is compiled.<br \/>\nThis isn&#8217;t true of JavaScript. In JavaScript, the way an object is meant to behave can change at more or less any time. A JIT engine could produce executable code to make an object behave one way, and then that object could be modified to invalidate the executable code. This means that the executable code has to be quite conservative to guard against this kind of modification. From time to time, bugs have cropped up that cause bad code to be generated.<br \/>\nBrowser developers are, therefore, in a frustrating position. They want scripting engines that are faster to enable the browser to be used for a wider range of applications, but their efforts to improve performance are hamstrung by JavaScript itself. The language simply isn&#8217;t designed for high performance optimization.<br \/>\nFull Story: <a href=\"http:\/\/arstechnica.com\/information-technology\/2013\/05\/native-level-performance-on-the-web-a-brief-examination-of-asm-js\/\" target=\"_blank\">Surprise! Mozilla can produce near-native performance on the Web | Ars Technica<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a bid to make JavaScript run ever faster, Mozilla has developed asm.js. It&#8217;s a limited, stripped down subset of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[9,10],"tags":[584,717],"class_list":["post-2329","post","type-post","status-publish","format-standard","hentry","category-software","category-technology","tag-javascript","tag-mozilla"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/papNkV-Bz","jetpack-related-posts":[{"id":6401,"url":"https:\/\/nccomputertech.com\/techtalk\/2014\/09\/10\/comcast-wi-fi-serving-self-promotional-ads-via-javascript-injection\/","url_meta":{"origin":2329,"position":0},"title":"Comcast Wi-Fi serving self-promotional ads via JavaScript injection","author":"NCCT","date":"September 10, 2014","format":false,"excerpt":"Comcast has begun serving Comcast ads to devices connected to one of its 3.5 million publicly accessible Wi-Fi hotspots across the US. Comcast's decision to inject data into websites raises security concerns and arguably cuts to the core of the ongoing net neutrality debate. A Comcast spokesman told Ars the\u2026","rel":"","context":"In &quot;Security&quot;","block_context":{"text":"Security","link":"https:\/\/nccomputertech.com\/techtalk\/category\/security\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nccomputertech.com\/techtalk\/wp-content\/uploads\/2014\/09\/javascreener-640x74.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nccomputertech.com\/techtalk\/wp-content\/uploads\/2014\/09\/javascreener-640x74.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/nccomputertech.com\/techtalk\/wp-content\/uploads\/2014\/09\/javascreener-640x74.png?resize=525%2C300 1.5x"},"classes":[]},{"id":3235,"url":"https:\/\/nccomputertech.com\/techtalk\/2013\/08\/21\/how-easy-is-it-to-hack-javascript-in-a-browser\/","url_meta":{"origin":2329,"position":1},"title":"How easy is it to hack JavaScript in a browser?","author":"NCCT","date":"August 21, 2013","format":false,"excerpt":"This Q&A is part of a weekly series of posts highlighting common questions encountered by technophiles and answered by users at Stack Exchange, a free, community-powered network of 100+ Q&A sites. Jesus Rodriguez asks: My question has to do with JavaScript security. Imagine an auth system where you're using a\u2026","rel":"","context":"In &quot;Security&quot;","block_context":{"text":"Security","link":"https:\/\/nccomputertech.com\/techtalk\/category\/security\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6642,"url":"https:\/\/nccomputertech.com\/techtalk\/2014\/10\/16\/firefox-33-brings-h-264-support-lets-you-send-videos-to-chromecast-and-roku-devices-from-android\/","url_meta":{"origin":2329,"position":2},"title":"Firefox 33 brings H.264 support, lets you send videos to Chromecast and Roku devices from Android","author":"NCCT","date":"October 16, 2014","format":false,"excerpt":"More than a month after Mozilla came out with Firefox 32, the company has updated the web browser for Android, Windows, Linux, and Mac platforms, bumping it to version 33.0. Aside from bug fixes, the update also brings some new features as well as performance improvements. One of the notable\u2026","rel":"","context":"In &quot;Security&quot;","block_context":{"text":"Security","link":"https:\/\/nccomputertech.com\/techtalk\/category\/security\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5801,"url":"https:\/\/nccomputertech.com\/techtalk\/2014\/06\/18\/where-does-troubled-mozilla-go-from-here\/","url_meta":{"origin":2329,"position":3},"title":"Where does troubled Mozilla go from here?","author":"NCCT","date":"June 18, 2014","format":false,"excerpt":"Once upon a time, it was simple. Mozilla, thanks to its open source web browser Firefox, was the feisty David to Microsoft's Internet Explorer Goliath. Under the technical leadership of Brendan Eich, Mozilla co-founder and creator of JavaScript, Firefox became a force to be reckoned with in web browsing at\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/nccomputertech.com\/techtalk\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nccomputertech.com\/techtalk\/wp-content\/uploads\/2014\/06\/mozilla-firefox-620x349.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nccomputertech.com\/techtalk\/wp-content\/uploads\/2014\/06\/mozilla-firefox-620x349.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/nccomputertech.com\/techtalk\/wp-content\/uploads\/2014\/06\/mozilla-firefox-620x349.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":8660,"url":"https:\/\/nccomputertech.com\/techtalk\/2015\/10\/09\/firefox-will-stop-supporting-plugins-by-end-of-2016-following-chromes-lead-pcworld\/","url_meta":{"origin":2329,"position":4},"title":"Firefox will stop supporting plugins by end of 2016, following Chrome&#8217;s lead","author":"NCCT","date":"October 9, 2015","format":false,"excerpt":"Google Chrome recently dumped support for plugins such as Java and Silverlight, and now it\u2019s Firefox\u2019s turn. Late Thursday, Mozilla announced on its blog that Firefox would stop supporting plugins based on the Netscape Plugin Application Programming Interface (NPAPI) architecture by the end of 2016.For many years, NPAPI plugins helped\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/nccomputertech.com\/techtalk\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5643,"url":"https:\/\/nccomputertech.com\/techtalk\/2014\/05\/30\/microsoft-goes-public-with-browser-development-plans\/","url_meta":{"origin":2329,"position":5},"title":"Microsoft goes public with browser development plans","author":"NCCT","date":"May 30, 2014","format":false,"excerpt":"Aiming to provide more transparency in how it develops Internet Explorer, Microsoft has launched a website to help keep developers abreast of the latest changes and plans for the browser. This site aims to put IE on similar ground with Mozilla Firefox or Google Chrome, which are open-source projects, so\u2026","rel":"","context":"In &quot;Microsoft&quot;","block_context":{"text":"Microsoft","link":"https:\/\/nccomputertech.com\/techtalk\/category\/microsoft\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/core1.staticworld.net\/images\/article\/2013\/05\/internet_explorer-100037081-gallery.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/core1.staticworld.net\/images\/article\/2013\/05\/internet_explorer-100037081-gallery.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/core1.staticworld.net\/images\/article\/2013\/05\/internet_explorer-100037081-gallery.jpg?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/posts\/2329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/comments?post=2329"}],"version-history":[{"count":0,"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/posts\/2329\/revisions"}],"wp:attachment":[{"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/media?parent=2329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/categories?post=2329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nccomputertech.com\/techtalk\/wp-json\/wp\/v2\/tags?post=2329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}