River Trail (JavaScript engine)

Last updated
River Trail
Developer(s) Intel
Repository

Blue pencil.svg

Website github.com/IntelLabs/RiverTrail

River Trail (also known as Parallel JavaScript) is an open source software engine designed by Intel for executing JavaScript code using parallel computing on multi-core processors.

A software engine refers to a central part of a computer program. The concept has however taken on slightly different meanings depending on context.

Intel American multinational corporation that manufactures semiconductor chips

Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, in the Silicon Valley. It is the world's second largest and second highest valued semiconductor chip maker based on revenue after being overtaken by Samsung, and is the inventor of the x86 series of microprocessors, the processors found in most personal computers (PCs). Intel ranked No. 46 in the 2018 Fortune 500 list of the largest United States corporations by total revenue.

JavaScript programming language

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language that conforms to the ECMAScript specification. It is a language that is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm.

Contents

River Trail was announced at the Intel Developer Forum in September 2011, and demonstrated using a Firefox extension developed by Intel. Brendan Eich, the original author of JavaScript, promised that he would promote River Trail within Ecma International, saying "The demo shows a 15x speedup over serial JavaScript. It lights up the ridiculously parallel hardware in modern CPUs and GPUs, for audio, video, image processing, automated voice response, computer vision, 3D gaming, etc. – all written in memory-safe, clean, functional JavaScript, without threads and their data races and deadlocks." [1] Because River Trail leverages Intel's OpenCL SDK [2] it can exploit multiple CPU cores as well as data parallel instructions (ex. AVX, SSE) and the speedup can be greater than the CPU core count would imply.

Firefox Free and open-source web browser by Mozilla

Mozilla Firefox is a free and open-source web browser developed by The Mozilla Foundation and its subsidiary, Mozilla Corporation. Firefox is available for Windows, macOS, Linux, BSD, illumos and Solaris operating systems. Its sibling, Firefox for Android, is also available. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards. In 2017, Firefox began incorporating new technology under the code name Quantum to promote parallelism and a more intuitive user interface. An additional version, Firefox for iOS, was released on November 12, 2015. Due to platform restrictions, it uses the WebKit layout engine instead of Gecko, as with all other iOS web browsers.

Brendan Eich American computer programmer and technologist

Brendan Eich is an American technologist and creator of the JavaScript programming language. He co-founded the Mozilla project, the Mozilla Foundation and the Mozilla Corporation, and served as the Mozilla Corporation's chief technical officer and briefly its chief executive officer. He is the CEO of Brave Software.

Ecma International standards organization

Ecma is a standards organization for information and communication systems. It acquired its current name in 1994, when the European Computer Manufacturers Association (ECMA) changed its name to reflect the organization's global reach and activities. As a consequence, the name is no longer considered an acronym and no longer uses full capitalization.

A native implementation of River Trail in Firefox's SpiderMonkey JavaScript engine was announced in September 2012 [3] and was added to nightly Firefox builds in April 2013. [4] By January 2015, the code had been removed from Firefox. [5] [6]

A JavaScript engine is a computer program that executes JavaScript (JS) code. The first JS engines were mere interpreters, but all relevant modern engines utilize just-in-time compilation for improved performance.

Operation

To use the engine scripts uses a special API, based on three pillars: a type called ParallelArray, several methods of Prototype of ParallelArray, and elementary functions. [7]

Data type classification of data in computer science

In computer science and computer programming, a data type or simply type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support common data types of real, integer and boolean. A data type constrains the values that an expression, such as a variable or a function, might take. This data type defines the operations that can be done on the data, the meaning of the data, and the way values of that type can be stored. A type of value from which an expression may take its value.

Prototype-based programming is a style of object-oriented programming in which behaviour reuse is performed via a process of reusing existing objects via delegation that serve as prototypes. This model can also be known as prototypal, prototype-oriented,classless, or instance-based programming. Delegation is the language feature that supports prototype-based programming.

Related Research Articles

Document Object Model convention for representing and interacting with objects in HTML, XHTML and XML documents

The Document Object Model (DOM) is a cross-platform and language-independent application programming interface that treats an HTML, XHTML, or XML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers attached to them. Once an event is triggered, the event handlers get executed.

Gecko (software) free HTML layout engine

Gecko is a browser engine developed by Mozilla. It is used in the Firefox browser, the Thunderbird email client, and many other projects.

ECMAScript is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. It was created to standardize JavaScript, so as to foster multiple independent implementations. JavaScript has remained the best-known implementation of ECMAScript since the standard was first published, with other well-known implementations including JScript and ActionScript. ECMAScript is commonly used for client-side scripting on the World Wide Web, and it is increasingly being used for writing server applications and services using Node.js.

SpiderMonkey is the code name for the first JavaScript engine, written by Brendan Eich at Netscape Communications, later released as open-source and currently maintained by the Mozilla Foundation. SpiderMonkey provides JavaScript support for Mozilla Firefox and various embeddings such as the GNOME 3 desktop.

ECMAScript for XML (E4X) is the standard ISO/IEC 22537:2006 programming language extension that adds native XML support to ECMAScript. The goal is to provide an alternative to DOM interfaces that uses a simpler syntax for accessing XML documents. It also offers a new way of making XML visible. Before the release of E4X, XML was always accessed at an object level. E4X instead treats XML as a primitive. This implies faster access, better support, and acceptance as a building block of a program.

Narcissus is an open source JavaScript engine. It was written by Brendan Eich, who also wrote the first JavaScript engine, SpiderMonkey. Its name is based on the mythical figure of Narcissus, who fell in love with himself. This relates to the fact that this JavaScript engine is a metacircular interpreter, because the engine itself is also written in JavaScript, albeit using non-standard extensions that are specific to SpiderMonkey.

Tamarin is a free software virtual machine with just-in-time compilation (JIT) support intended to implement the 4th edition of the ECMAScript (ES4) language standard. Tamarin source code originates from ActionScript Virtual Machine 2 (AVM2) developed by Adobe Systems, as introduced within Adobe Flash Player 9, which implements ActionScript 3 scripting language. ActionScript Virtual Machine 2 was donated as open-source to Mozilla Foundation on November 7, 2006, to develop Tamarin as a high-performance virtual machine, with the support from broad Mozilla community, to be used by Mozilla and Adobe Systems in the next generation of their JavaScript and ActionScript engines with the ultimate aim to unify the scripting languages across web browsers and Adobe Flash platform and ease the development of rich better performing web applications.

Firefox 4 version 4 of web browser Mozilla Firefox

Mozilla Firefox 4 is a version of the Firefox web browser, released on March 22, 2011. The first beta was made available on July 6, 2010; Release Candidate 2 was released on March 18, 2011. It was codenamed Tumucumaque, and was Firefox's last large release cycle. The Mozilla team planned smaller and quicker releases following other browser vendors. The primary goals for this version included improvements in performance, standards support, and user interface.

Chakra is a JScript engine developed by Microsoft for its 32-bit version of the Internet Explorer 9 (IE9) web browser.

CommonJS is a project with the goal of specifying an ecosystem for JavaScript outside the browser.

A browser speed test is a computer benchmark that scores the performance of a web browser, by measuring the browser's efficiency in completing a predefined list of tasks. In general the testing software is available online, located on a website, where different algorithms are loaded and performed in the browser client. Typical test tasks are rendering and animation, DOM transformations, string operations, mathematical calculations, sorting algorithms, graphic performance tests and memory instructions. Browser speed tests have been used during browser wars to prove superiority of specific web browsers. The popular Acid3 test is no particular speed test but checks browser conformity to web standards.

Mozilla Free and open-source software community, developer of Firefox and Thunderbird

Mozilla is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, with only minor exceptions. The community is supported institutionally by the not-for-profit Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation.

PDF.js PDF viewer in JavaScript included in Mozilla Firefox

PDF.js or pdf.js is a JavaScript library that renders Portable Document Format (PDF) files using the web standards-compliance HTML5 Canvas. The project is led by the Mozilla Foundation after Andreas Gal launched it in 2011.

asm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical language used for such applications.

PlayCanvas

PlayCanvas is an open-source 3D game engine/interactive 3D application engine alongside a proprietary cloud-hosted creation platform that allows for simultaneous editing from multiple computers via a browser-based interface. It runs in modern browsers that support WebGL, including Mozilla Firefox and Google Chrome. The engine is capable of rigid-body physics simulation, handling three-dimensional audio and 3D animations.

WebAssembly binary format for executables used by web pages

WebAssembly is a standard that defines a binary format and a corresponding assembly-like text format for executables used by web pages.

This is a list of articles related to the JavaScript programming language.

References

  1. Cade Metz (17 September 2011). "Intel extends JavaScript for parallel programming". The Register . Retrieved 2013-04-10.
  2. Hillar, Gaston (29 September 2011). "Introducing Intel Labs' River Trail". Dr. Dobb's. Retrieved 29 January 2014.
  3. Gareth Halfacree (13 September 2012). "Intel boosts JavaScript with River Trail release". bit-tech . Retrieved 2013-04-10.
  4. "Bug 829602 - ParallelDo intrinsic and self-hosted ParallelArray". Mozilla Foundation . Retrieved 2013-04-10.
  5. "Bug 801869 - (PJS) PJS: Efficient threaded runtime for data-parallel JavaScript". Bugzilla@Mozilla. Mozilla Foundation. 2015-01-19. Retrieved 2015-04-23.
  6. "PJS has been removed from Spidermonkey" . Retrieved 2017-10-18.
  7. Three pillars of the API , retrieved 2011-09-14