Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Google's V8 engine really limited to 1 VM per process? [closed]

Tags:

c++

javascript

v8

I can't get a straight forward answer on this. Is Google's V8 engine really limited to 1 VM per process?

If google's v8 engine is limited to only 1 VM per process, then doesn't it sort of exclude itself from being used in libraries? Say I code up a c++ library that uses V8 called LibA. And someone else codes up another library that uses V8 called LibB. If an application links to both LibA and LibB bad stuff would happen (right?).

I need a fast (with speed being the most important requirement actually) javascript parser for a lib I'm trying to write, but I don't want to use v8 if I'll run into this problem (it's likely that the kind of applications that link to it will also use v8 at some point).

like image 252
Prismatic Avatar asked Feb 03 '12 02:02

Prismatic


People also ask

How does Google V8 engine work?

The V8 engine uses the Ignition interpreter, which takes in the Abstract Syntax Tree as the input and gives the byte code as the output, which further proceeds to the execution phase. When the code is being interpreted, the compiler tries to talk with the interpreter to optimize the code.

Is V8 a virtual machine?

V8 is Google's JavaScript engine, written in C++. It compiles and executes JavaScript code inside of a VM (Virtual Machine). When a webpage loaded into Google Chrome demonstrates some sort of dynamic effect, like automatically updating a list or news feed, you are seeing JavaScript, compiled by V8, at work.

Why does Google use V8 engines?

V8 JavaScript engine was initially developed for Google Chrome and Chromium web browsers to improve the performance of JavaScript execution. The project's creator, Lars Bak, created the first version that was released at the same time as the first version of Google Chrome in September 2008.

What is Chrome V8 runtime?

V8 is Google's open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors.


1 Answers

Based on this closed bug report, it's safe to say that Google's V8 engine is not limited to a single thread per process (since approximately April 2011).

like image 110
Ken Bloom Avatar answered Oct 20 '22 21:10

Ken Bloom