By Jen Looper
Writing code for the Web sometimes feels a little magical in that developers write a sequence of characters and like magic, those characters turn into concrete images, words, and actions within a browser. Understanding the technology can help developers better tune their craft as programmers.
A system virtual machine, for example, provides a complete emulation of a platform on which an operating system can be executed. Mac users are familiar with Parallels, a system virtual machine that allows Windows to be run on a Mac.
A process virtual machine, on the other hand, is less fully functional and can run only one program or process. Wine is a process virtual machine that allows Windows applications to be run on a Linux machine, but does not provide an entire Windows OS on a Linux box.
These compilers are Full-codegen, a fast compiler that produces un-optimized code and Crankshaf, a slower compiler that produces fast, optimized code.
If Crankshaft determines that the un-optimized code generated by Full-codegen is in need of optimization, it replaces it—a process known as ‘crankshafting.’
Once machine code is produced by the compilation process, the engine exposes all the data types, operators, objects, and functions specified in the ECMA standard to the browser or any runtime that needs to use them, like NativeScript.
The bottom line is that the evolution of these engines parallels the quest to evolve the Web and mobile spheres to make them perform as well as possible. To track this evolution, benchmarking graphs produced on sites such as arewefastyet.com show how various engines perform in comparison to each other.
Any Web developer needs to be aware of the differences inherent in the browsers that display the code that is produced, debugged, and maintained. More specifically, it’s important to understand why certain scripts may work slowly on one browser faster on another.
Jen Looper is Progress Software’s developer advocate for the Telerik Platform. Looper is also a Web and mobile developer and founder of Ladeez First Media, which is an indie mobile development studio. In her spare time, she is a dancer, teacher, and multiculturalist who is always learning.
Dec2015, Software Magazine
Dec 7, 2015Cassie Balentine