Skip to main content

V8s, Monkeys and Chakras of the web world.


At present, many people are connected to the internet and actively using web browsers. So it will be interesting to have a look at JavaScript engines which make these browsers the kind of software they are.

What is a JavaScript engine?

A java script engine is a program that is mostly run in browsers which executes JavaScript codes. Most of the time, these engines use C++. These are also known as ECMA script engines since ECMA script is the standard specification for java script. First java script engines were interpreters. First java script engine was created in 1995, by Brendan Eich for the Netscape Navigator Browser. This evolved into spidermonkey engine which is used in Firefox browser. Today, most of the java script engines are developed and distributed by web browser vendors like Mozilla and google. Java script engines are run in browsers via the Document Object Model together with the rendering engines. Today java script engines are not only used for browsers, but for other frameworks such as node.js.

 

About ECMAScript.

When discussing about topics involving JavaScript, ECMAScript is also related. It is because ECMAScript is a JavaScript standard, standardized by ECMA (European Computer Manufacturers Association) international. ECMAScript itself is a general purpose scripting language. This standardization allows interoperability of web pages across multiple web browsers. ECMAScript is standardized according to the document ECMA-262.

 

Chrome V8 engine



 

Since chrome is the most popular web browser at present, chrome’s V8 JavaScript engine is probably the most widely used java script engine at present. Also, V8 java script engine is used in popular frameworks like node.js. Therefore, usages for V8 java script engine are massive. V8 engine was released Chrome’s V8 engine is open source. V8 engine is stated as a ‘high-performance JavaScript and Web Assembly engine’ which is written in C++. It implements ECMAScript and web assembly. It can run standalone or embedded into any C++ application. V8 engine supports windows 7 or later, macOS 10.12 or later and Linux systems that use x64, IA-32, ARM or MIPS processors.

V8 engine is used together with blink (which is another java script engine) in the chromium open-source project. Chromium project is used in many other browsers besides chrome. Some notable browsers that use the chromium project are, Microsoft Edge and Brave. So V8 engine is probably everywhere.

 

SpiderMonkey


SpiderMonkey is the java script engine currently used by Firefox browser offered by Mozilla. This engine was actually derived from the first java script engine created by Brendan Eich in 1995 as mentioned earlier in this article. This engine is currently open-source and written in           C++ and Rust. Implementation of this engine is also defined by ECMAScript and WebAssembly specifications.

Some components of this engine include JavaScript parser, JavaScript interpreter JS::Value and JSObject, garbage collector. The Javascript parser evaluates the script into an Abstract Syntax Tree (AST) and run the ByteCodeEmitter (BCE) to generate a bytecode format which the team behind spidermonkey refers to as Stencil. By default, parser runs in a mode called syntax or lazy parsing where generating the full bytecode is avoided. The so produced bytecode may be executed by the interpreter written in C++ which in turns manipulates native code of the host. In order to speed up the execution of this bytecode, this uses a series of just in time compilers to generate specialized machine code tailored to Javascript.

 

Chakra

This is also a notable JavaScript engine although it may not be widely used today as V8 or spidermonkey. It was developed by Microsoft for its Internet Explorer web browser as an open-source project. This made its way into Microsoft’s legacy Edge browser as ChakraCore with few changes. Chakra engine is also written in C+.

 

So, in today’s world where internet and web is almost dominated by google, there V8 engine is probably the most used JavaScript engine at present. Spidermonkey is also considerably widely used in Firefox browser which is rising in popularity.

Comments

Popular posts from this blog

Flutter for mobile development

As a person who is enthusiastic about programming and developing, I constantly look for new technologies and trends that emerge. Flutter came under my radar a couple of years ago when I was researching about mobile application development.  At that moment, my mobile development skills were limited, but nevertheless, I decided to give it a try. It interested me as it promised to help the developer make an application that would run on android, iOS, an even the web with one code base. I completed one or two tutorials offered by the flutter developer site itself but as time went on due to other areas of my studies I had to focus on, flutter slowly slipped away from me. Fast forward to today, and I have received a fair amount of beginner experience on native android development and I decided to try out flutter again. Although it offers many options, I mainly focused on mobile development. What is flutter?   Flutter is a UI toolkit offered by google intended to be used to develop applic

Installing Ubuntu desktop for Dual Booting with Windows

      Introduction Ubuntu is a Linux distribution published by the canonical team. The term ‘Ubuntu’ is an ancient African word meaning ‘humanity to others'. Ubuntu is a freely available desktop operating system that is easy to use. There are other versions of Ubuntu that are targeted for Servers, IoT and Cloud as well. In this article we are going to focus on installing Ubuntu desktop on a personal machine. Why Ubuntu? There can be several reasons for a person to use Ubuntu as their Operating System on the machine they use. The first obvious point is that is free to use. Therefore, some people may like to use this for their computational tasks. Some people can have use cases that will require a Linux system (or a UNIX like OS) such as programming in C or android platform development (which can be harder or impossible to perform on a Windows environment). For those people, a Linux distribution will be a good option (Since other UNIX like Systems can be cost prohibit