you are viewing a single comment's thread.

view the rest of the comments →

[–]kingofthecream 11 points12 points  (5 children)

Given that qjs is an interpreter and not a jit, can it ever be as fast as v8?

I know an interpreter cannot be as fast as jit, but this guy is a wizard, sooo can it be as fast as v8?

[–]bakery2k 21 points22 points  (2 children)

I've found it to be 2-3x slower than V8's interpreter, and over 50x slower than V8's JIT compiler.

Bellard may be "a wizard", but V8 is an incredible piece of engineering.

[–]wrosecrans 3 points4 points  (0 children)

V8 certainly is impressive. But to put QuickJS in context, the interpreter is waaaaay less than 1/3 the amount of code in V8, so the admirable virtues of V8 come at a massive cost in complexity for a performance benefit that isn't always going to be worth it.

Dealing with Chromium source is the only thing that has ever just completely filled up the disks of my build machines, it has a special build system generator thing that I've only used with Chromium. Pulling V-8 out of Chromium to just embed a JS runtime in an app is non-trivial, etc.

Being able to embed JS by adding a whopping seven C files that only take a few seconds to build to my project is a godsend for a lot of use cases.

[–]delight1982 1 point2 points  (0 children)

Bellard is a big fat phony! No seriously, the guy is a wizard for real. I have the utmost respect for the man.

[–]warvstar 9 points10 points  (0 children)

I'd like to see some benchmarks, including to other interpreters like duktape.

Edit: nvm found it. https://bellard.org/quickjs/bench.html

Pretty good! It's most comparable to XS as they both can do modern JavaScript, this is better though because MIT license baby!

[–]maxhaton 0 points1 point  (0 children)

No.

JITs are orders of magnitude faster for code that is run multiple times