{"id":1033,"date":"2014-05-14T01:02:46","date_gmt":"2014-05-14T00:02:46","guid":{"rendered":"http:\/\/www.malcolmhardie.com\/weblogs\/angus\/?p=1033"},"modified":"2025-02-01T03:04:14","modified_gmt":"2025-02-01T03:04:14","slug":"webkit-javascript-optimizing-jit-compilers","status":"publish","type":"post","link":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/2014\/05\/14\/webkit-javascript-optimizing-jit-compilers\/","title":{"rendered":"Webkit Javascript Optimizing JIT compiler(s)"},"content":{"rendered":"<p>Is your JIT compiled javascript function running too slow?<br \/>\nNo worries, just wait and the javascript engine will recompile it and then replace the function with a faster version!<\/p>\n<p>But that&#8217;s not fast enough either?<br \/>\nWebkit will compile another version using more optimizations, using code from LLVM.<\/p>\n<p>Is the function still executing some long running loop?<br \/>\nNo problem! The javascript engine will copy all of the current state and build a new compiled function that starts at the beginning of that loop, then replace the old slower function with the new one, <strong>while it is still running!<br \/>\n<\/strong>It gets flipped over at the beginning of the next run through the loop.<br \/>\n(see the Hot-Loop Transfer section of the original article)<\/p>\n<p>Just from the description, this sounds stupendously complicated. But the performance improvements are apparently quite considerable.<\/p>\n<p>I&#8217;m truly impressed by the effort that goes in and the work that&#8217;s been done on this.<\/p>\n<p>\ud83d\ude42<\/p>\n<p>Read the original post for the full details:<br \/>\n<a href=\"https:\/\/www.webkit.org\/blog\/3362\/introducing-the-webkit-ftl-jit\/\">https:\/\/www.webkit.org\/blog\/3362\/introducing-the-webkit-ftl-jit\/<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is your JIT compiled javascript function running too slow? No worries, just wait and the javascript engine will recompile it and then replace the function with a faster version! But that&#8217;s not fast enough either? Webkit will compile another version using more optimizations, using code from LLVM. Is the function still executing some long running [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,10,14],"tags":[],"class_list":["post-1033","post","type-post","status-publish","format-standard","hentry","category-internet-stuff","category-macintosh","category-writing-software"],"_links":{"self":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts\/1033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/comments?post=1033"}],"version-history":[{"count":1,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts\/1033\/revisions"}],"predecessor-version":[{"id":1300,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts\/1033\/revisions\/1300"}],"wp:attachment":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/media?parent=1033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/categories?post=1033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/tags?post=1033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}