WebKit Unifies JavaScript Compilation With LLVM Optimizer
An anonymous reader tips this post at Webkit.org:
"Just a decade ago, JavaScript – the programming language used to drive web page interactions – was thought to be too slow for serious application development. But thanks to continuous optimization efforts, it's now possible to write sophisticated, high-performance applications – even graphics-intensive games – using portable standards-compliant JavaScript and HTML5. This post describes a new advancement in JavaScript optimization: the WebKit project has unified its existing JavaScript compilation infrastructure with the state-of-the-art LLVM optimizer. This will allow JavaScript programs to leverage sophisticated optimizations that were previously only available to native applications written in languages like C++ or Objective-C. ... I'm happy to report that our LLVM-based just-in-time (JIT) compiler, dubbed the FTL – short for Fourth Tier LLVM – has been enabled by default on the Mac and iOS ports. This post summarizes the FTL engineering that was undertaken over the past year. It first reviews how WebKit's JIT compilers worked prior to the FTL. Then it describes the FTL architecture along with how we solved some of the fundamental challenges of using LLVM as a dynamic language JIT. Finally, this post shows how the FTL enables a couple of JavaScript-specific optimizations."
Wrong on two counts. First, the WebKit project's JavaScript engine, JavaScriptCore, which this relates to is not used at all by Chrome, which uses V8 instead. Second, Chrome now uses a fork of WebKit, not the upstream project.
I am TheRaven on Soylent News
As I understand the behavior of this option, it doesn't save the DOM, only the URLs, and it reloads them on restart as if the user had pressed F5. So if the web application has loaded a bunch of stuff through AJAX in response to user interaction, it won't reload. For example, if you have collapsed all comments in a Slashdot discussion other than the ones to which you intend to reply, the set of collapsed comments will be lost after a reload. Besides, it won't work at all if your laptop is out of range of Wi-Fi when you reopen the browser.
In ideal conditions, C++ compiled to JavaScript, using asm.js, can be almost as fast as an 'ordinary' build of the C++ code.
What idiot would want JavaScript for application development?
Me. I am one of the idiots. I like prototypes over classes and like I like first-class functions. I'm in good company. Other idiots include Google, DataHero, Facebook, Dow Jones, and Uber.
I do. I work for a small company and we write all of our tablet apps in JavaScript and wrap them in Cordova. It lets us deploy on iOS, Android, and Windows all at once with minimal effort and cost, which is great for a small dev team. It even makes testing a breeze because I can write all of my functional tests in CasperJS and be reasonably sure that everything is working right prior to handing things off to the test team. Much easier than messing with some junk software like Appium and and writing tests for each mobile platform individually
hey!