{"id":531,"date":"2011-11-10T14:20:55","date_gmt":"2011-11-10T14:20:55","guid":{"rendered":"http:\/\/blog.mozilla.org\/futurereleases\/?p=531"},"modified":"2011-11-17T17:33:02","modified_gmt":"2011-11-17T17:33:02","slug":"type-inference-to-firefox-beta","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/","title":{"rendered":"Type Inference brings JS improvements to Firefox Beta"},"content":{"rendered":"<p><em>Blog by Brian Hackett, Firefox Engineer<\/em><\/p>\n<p>Firefox 9 features the release of Type Inference, or TI, a research project under way for over a year. TI is a feature in the SpiderMonkey Javascript engine which generates type information about Javascript programs through a combination of analyzing the program&#8217;s code and monitoring the types of values as the program executes. This type information is used during JIT compilation to generate more efficient code; Firefox 9 includes modifications to the JaegerMonkey JIT compiler to use inferred type information. This compilation mode, which is the default in Firefox 9, speeds up major benchmarks like Kraken and V8 by over 30%, and gives a large speed boost to many JS heavy websites.<\/p>\n<p>Javascript is a dynamically typed language, and without knowing the types of values a JIT compiler needs to generate code that accounts for all the possible types of the involved values. This significantly slows down execution of the program in comparison with a statically typed language like Java. With TI integration into JaegerMonkey, we are closing a significant part of this performance gap. Ongoing Mozilla projects are being built to leverage inferred type information. With these projects, primarily IonMonkey, Mozilla&#8217;s next generation JIT compiler, we hope to close the performance gap with Java completely. A more detailed writeup on the internal algorithms and other techniques used by Type Inference is available <a title=\"TI Article\" href=\"http:\/\/people.mozilla.org\/~lmesa\/ti-draft.pdf\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Blog by Brian Hackett, Firefox Engineer Firefox 9 features the release of Type Inference, or TI, a research project under way for over a year. TI is a feature in &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/\">Read more<\/a><\/p>\n","protected":false},"author":391,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8802],"tags":[],"coauthors":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Type Inference brings JS improvements to Firefox Beta - Future Releases<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"bhackett@mozilla.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/\",\"url\":\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/\",\"name\":\"Type Inference brings JS improvements to Firefox Beta - Future Releases\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/#website\"},\"datePublished\":\"2011-11-10T14:20:55+00:00\",\"dateModified\":\"2011-11-17T17:33:02+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/#\/schema\/person\/9b15ee5d4d432e47c14086b9d86de55e\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/futurereleases\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Type Inference brings JS improvements to Firefox Beta\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/futurereleases\/\",\"name\":\"Future Releases\",\"description\":\"Be the first to know what&#039;s new with upcoming Firefox releases.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/futurereleases\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/#\/schema\/person\/9b15ee5d4d432e47c14086b9d86de55e\",\"name\":\"bhackett@mozilla.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/futurereleases\/#\/schema\/person\/image\/7ff20f86e9414df22c6a4c7efbc2dcd0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/26f12cee362d5d9674b159380ebb7ee1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/26f12cee362d5d9674b159380ebb7ee1?s=96&d=mm&r=g\",\"caption\":\"bhackett@mozilla.com\"},\"url\":\"https:\/\/blog.mozilla.org\/futurereleases\/author\/bhackettmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Type Inference brings JS improvements to Firefox Beta - Future Releases","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/","twitter_misc":{"Written by":"bhackett@mozilla.com","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/","url":"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/","name":"Type Inference brings JS improvements to Firefox Beta - Future Releases","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/futurereleases\/#website"},"datePublished":"2011-11-10T14:20:55+00:00","dateModified":"2011-11-17T17:33:02+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/futurereleases\/#\/schema\/person\/9b15ee5d4d432e47c14086b9d86de55e"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/futurereleases\/2011\/11\/10\/type-inference-to-firefox-beta\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/futurereleases\/"},{"@type":"ListItem","position":2,"name":"Type Inference brings JS improvements to Firefox Beta"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/futurereleases\/#website","url":"https:\/\/blog.mozilla.org\/futurereleases\/","name":"Future Releases","description":"Be the first to know what&#039;s new with upcoming Firefox releases.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/futurereleases\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/futurereleases\/#\/schema\/person\/9b15ee5d4d432e47c14086b9d86de55e","name":"bhackett@mozilla.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/futurereleases\/#\/schema\/person\/image\/7ff20f86e9414df22c6a4c7efbc2dcd0","url":"https:\/\/secure.gravatar.com\/avatar\/26f12cee362d5d9674b159380ebb7ee1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/26f12cee362d5d9674b159380ebb7ee1?s=96&d=mm&r=g","caption":"bhackett@mozilla.com"},"url":"https:\/\/blog.mozilla.org\/futurereleases\/author\/bhackettmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/posts\/531"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/users\/391"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/comments?post=531"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/posts\/531\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/media?parent=531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/categories?post=531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/tags?post=531"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/futurereleases\/wp-json\/wp\/v2\/coauthors?post=531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}