{"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_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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}},"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":9886,"url":"https:\/\/nccomputertech.com\/techtalk\/2024\/12\/08\/12gb-vram-10-faster-than-4060-and-only-249-intel-arc-battlemage-is-going-to-be-nuts\/","url_meta":{"origin":2329,"position":0},"title":"12GB VRAM, 10% faster than 4060 and only $249?? Intel ARC Battlemage is going to be nuts!","author":"NCCT","date":"December 8, 2024","format":false,"excerpt":"https:\/\/youtu.be\/K9fUlvOsxCI Intel dropped the details on the new Xe2 GPUs, the B570 and B580 GPUs... aggressively priced and targeting the 1440p gaming resolution, will these be competitive options outside of AMD and NVIDIA?","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/nccomputertech.com\/techtalk\/category\/hardware\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/K9fUlvOsxCI\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9818,"url":"https:\/\/nccomputertech.com\/techtalk\/2024\/11\/11\/intel-is-cooked\/","url_meta":{"origin":2329,"position":1},"title":"Intel is cooked.","author":"NCCT","date":"November 11, 2024","format":false,"excerpt":"https:\/\/youtu.be\/ub27Ol4igwY 0:00 Welcome to Paul\u2019s Tech News - Nov 10, 2024 1:33 AMD Ryzen 9800X3D Post Launch Diagnosis - sold out in minutes 3:18 AMD May Add 3D V-cache to Mobile APUs, Threadripper 4:15 Nvidia ousts Intel from Dow Jones Index after 25-year run 5:43 For the first time ever,\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/nccomputertech.com\/techtalk\/category\/technology\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/ub27Ol4igwY\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9403,"url":"https:\/\/nccomputertech.com\/techtalk\/2018\/10\/01\/older-than-the-mini-jack-this-week-in-tech-686\/","url_meta":{"origin":2329,"position":2},"title":"Older Than the Mini Jack &#8211; This Week in Tech 686","author":"NCCT","date":"October 1, 2018","format":false,"excerpt":"https:\/\/youtu.be\/a2BeanU0FsU Facebook breach, Elon\u2019s costly tweet, Google turns 20, and more. --How to tell if your Facebook account is one of the 50 million that were hacked this week --Why the founder of Instagram left Facebook --\"Funding secured\" tweet costs Elon Musk his chairmanship and $40 million --Google turns 20\u2026","rel":"","context":"In &quot;Social Media&quot;","block_context":{"text":"Social Media","link":"https:\/\/nccomputertech.com\/techtalk\/category\/social-media\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/a2BeanU0FsU\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9450,"url":"https:\/\/nccomputertech.com\/techtalk\/2018\/11\/20\/are-passwords-immortal-security-now-690\/","url_meta":{"origin":2329,"position":3},"title":"Are Passwords Immortal? &#8211; Security Now 690","author":"NCCT","date":"November 20, 2018","format":false,"excerpt":"https:\/\/youtu.be\/mOSTtkK7vy0 Pwn2Own, the Future of Passwords. -- All the action at last week's Pwn2Own Mobile hacking contest -- The final word on processor mis-design in the Meltdown\/Spectre era -- A workable solution for unsupported Intel firmware upgrades for hostile environments -- A forthcoming Firefox breach alert feature -- The expected\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\/img.youtube.com\/vi\/mOSTtkK7vy0\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9307,"url":"https:\/\/nccomputertech.com\/techtalk\/2018\/03\/11\/this-week-in-tech-657-dadgum-cell-phone\/","url_meta":{"origin":2329,"position":4},"title":"This Week in Tech 657: DadGum Cell Phone","author":"NCCT","date":"March 11, 2018","format":false,"excerpt":"https:\/\/youtu.be\/KGrJJj_8YHU SXSW features killer robots and killer barbeque. Alexa's spontaneous laugh makes us afraid of an AI takeover. Amazon wants to take over your checking account. Can blockchain reinvent fintech? Android users more loyal than iOS users. Is AI really all that smart? Apple hires M. Night Shyamalan. Millennials love\u2026","rel":"","context":"In &quot;Social Media&quot;","block_context":{"text":"Social Media","link":"https:\/\/nccomputertech.com\/techtalk\/category\/social-media\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/KGrJJj_8YHU\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9908,"url":"https:\/\/nccomputertech.com\/techtalk\/2025\/02\/11\/fake-frames-tested-dlss-4-0-mfg-4x-nvidias-misleading-review-guide\/","url_meta":{"origin":2329,"position":5},"title":"&#8220;Fake Frames&#8221; Tested | DLSS 4.0, MFG 4X, &#038; NVIDIA&#8217;s Misleading Review Guide","author":"NCCT","date":"February 11, 2025","format":false,"excerpt":"https:\/\/youtu.be\/Nh1FHR9fkJk We talk about NVIDIA's DLSS 4.0 multi-frame generation (MFG), NVIDIA's weird decisions on testing tools, differences in transformer vs. CNN (convolutional neural network) models, benchmark performance, and generated frames. Frame generation commonly gets referred to as \"artificial\" frames, \"generated\" frames, or commonly online, \"fake frames.\" This video delves into\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/nccomputertech.com\/techtalk\/category\/hardware\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/Nh1FHR9fkJk\/0.jpg?resize=350%2C200","width":350,"height":200},"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}]}}