Live data from Hacker News

JavaScript engines zoo – Compare every JavaScript engine

zoo.js.org

81–90 of 97 posts

Re: JavaScript engines zoo – Compare every JavaScript engine

#81
post #22

Earlier quoted context omitted.

> Google has a lot more incentive than Apple to make the fastest engine What are those incentives? I see no incentive for Google to make something fast.

Faster page load times increases engagement with the web. More engagement on the web leads to more engagement with Google's ads.

I don't agree. Page load times do not matter when everything is so locked down that most people don't even know there's an alternative.

Re: JavaScript engines zoo – Compare every JavaScript engine

#82
post #41

All these JavaScript engines and it's still remarkably hard to find a robust solution for executing JavaScript from untrusted sources inside my own server-side applications. Every time I look I find repos that look promising at first but are either unmaintained or have a team or just one or two maintainers running them as a side project. I want my sandbox to be backed by a large, well funded security team working for…

> I want my sandbox to be backed by a large, well funded security team

How much are you ready to pay for a license?

Re: JavaScript engines zoo – Compare every JavaScript engine

#83

genuine question, let us say you took the source code of every single engine you see here and feed it to all the 10000 llms and ask them to analyze the code, optimize every function the best way they see fit, make architectural changes as and when they see appropriate, what do you think will be the result from cutting edge models?

Considering the relatively limited context window even on the latest models, the output would likely be incoherent mess. Sure, you could make the LLM go through the code in easily digestible chunks (file by file) but to get any groundbreaking optimization, it would need to have the context of the entire project to properly understand the architecture. (IMO that is, I'm not an expert)

Re: JavaScript engines zoo – Compare every JavaScript engine

#84
post #77
post #74

Earlier quoted context omitted.

mquickjs shouldn't be escapable, in theory, given the memory model. I would do everything possible to avoid WASM, otherwise I'd just run V8.

Why avoid WASM?

Because what's the point?

You're running JS (an 'interpreted', managed language) - it's already intentionally designed to be executed in a sandbox. Unless you provide hooks out to the host system, it can't do anything bad. With mquickjs, the untrusted code can't even overflow your heap or take too much execution time.

If you were running untrusted C or something, it would make more sense to add the WASM layer.

Re: JavaScript engines zoo – Compare every JavaScript engine

#85
post #66
post #62

Earlier quoted context omitted.

> the whole point of WebAssembly is to solve this one problem. For Wasm to be a secure sandbox, you have to assume a bug-free compiler/interpreter, which, alas, none of them really are. It's a somewhat easier problem than building a bug-free JavaScript runtime, but not by as much as you might expect, sadly. > I want to build extension systems for my own apps such that users can run their own code or paste in code wri…

Yeah my ideal is to have something that cleanly "pip installs" as a dependency such that users of my open source Python projects can self host tools that let them extend using arbitrary code, including code written by LLMs. I've been picking at this problem for a few years now! On the one hand I get why it's so hard. But it really feels like it should be possible to solve this in 2026 - executing arbitrary code in a…

If the code is gonna be written by LLMs anyway skip the js, directly use wasm and allow any language that compiles to it with something like https://extism.org/

Re: JavaScript engines zoo – Compare every JavaScript engine

#86
post #84
post #77

Earlier quoted context omitted.

Why avoid WASM?

Because what's the point? You're running JS (an 'interpreted', managed language) - it's already intentionally designed to be executed in a sandbox. Unless you provide hooks out to the host system, it can't do anything bad. With mquickjs, the untrusted code can't even overflow your heap or take too much execution time. If you were running untrusted C or something, it would make more sense to add the WASM layer.

Mainly defence in depth.

I have enormous respect for Fabrice but mquickjs is only a few weeks old and I'm no way near skilled enough to audit his C code!

Running it in WASM feels a lot safer to me.

Re: JavaScript engines zoo – Compare every JavaScript engine

#87
post #41

All these JavaScript engines and it's still remarkably hard to find a robust solution for executing JavaScript from untrusted sources inside my own server-side applications. Every time I look I find repos that look promising at first but are either unmaintained or have a team or just one or two maintainers running them as a side project. I want my sandbox to be backed by a large, well funded security team working for…

> I want my sandbox to be backed by a large, well funded security team How much are you ready to pay for a license?

Nothing, because I want this for open source projects that I give away for free. That doesn't work if I have to tell my users to go pay a license fee for one of the components.

Re: JavaScript engines zoo – Compare every JavaScript engine

#88
post #86
post #84

Earlier quoted context omitted.

Because what's the point? You're running JS (an 'interpreted', managed language) - it's already intentionally designed to be executed in a sandbox. Unless you provide hooks out to the host system, it can't do anything bad. With mquickjs, the untrusted code can't even overflow your heap or take too much execution time. If you were running untrusted C or something, it would make more sense to add the WASM layer.

Mainly defence in depth. I have enormous respect for Fabrice but mquickjs is only a few weeks old and I'm no way near skilled enough to audit his C code! Running it in WASM feels a lot safer to me.

At that point why not just run V8 isolates, if JS is your only guest?

Re: JavaScript engines zoo – Compare every JavaScript engine

#89

Earlier quoted context omitted.

That’s the promise of Bun - that it is faster because it uses JavascriptCore.

Bun is faster because it implements pretty much everything natively and just exposes them in JS, not because it uses JSCore I believe long term, V8 will become the undisputed champ again as Google has a lot more incentive than Apple to make the fastest engine, but this is just a wild guess of mine, and I'm biased being a Node.js Collaborator I've been hearing for a while that JSCore has a more elegant internal archit…

For a long time v8 was the fastest on a set of benchmarks but not on real world work load. That was the time when SpiderMonkey and JSC decided to go on a different path. I believe it was Mozilla that make the move first.

If we believe there is limit to everything, then the only sane conclusion would be v8 and JSC would both perform nearly the same with negligible difference in the long term. So choosing something that is fast, simple to integrate now makes a lot more sense.

Of course that is assuming memory usage, security and others being equal.

Re: JavaScript engines zoo – Compare every JavaScript engine

#90

Earlier quoted context omitted.

Bun is faster because it implements pretty much everything natively and just exposes them in JS, not because it uses JSCore I believe long term, V8 will become the undisputed champ again as Google has a lot more incentive than Apple to make the fastest engine, but this is just a wild guess of mine, and I'm biased being a Node.js Collaborator I've been hearing for a while that JSCore has a more elegant internal archit…

Bun's original marketing used JSCore's superior performance as a main benefit over Node.js.[0] Why would Google have more incentive than Apple to make the fastest engine? Safari being the fastest mobile browser is important to Apple. If Google had a stronger incentive than Apple, we would have seen V8 being more performant by now. [0] https://web.archive.org/web/20220724110148/https://bun.sh/

Because tech debt is real... V8 exists and likely isn't going to be completely displaced as a whole. That said, I can't speak for what are or aren't priorities for Google... I'd say they and Apple both have every incentive to give a good experience, and how far that is from the "best" experience will vary.
Post reply on HN