3 ms·
> Is there anywhere it's a clearly better choice? Embeddable use when you need latest ECMAScript support. > Does it have a shot of being a top class engine?
by rfoo 2y ago
> Is there anywhere it's a clearly better choice?
Embeddable use when you need latest ECMAScript support.
> Does it have a shot of being a top class engine?
No.
- akie 2y agoWhy does it not have a shot of being a top class engine?
- petters 2y agoPerformance
- masklinn 2y agoBecause the main goals are to be small, embeddable, and have low startup time. A top class engine requires a JIT and that generally leads to being large and having high startup time. LuaJIT is pretty much the exception which proves the rule and 1. Mike Pall is a monster of a developer not unlike Bellard; and 2. Pall is on record (in discussions with other JIT people) that in his opinion you can’t bolt a JIT to an existing runtime and get a maximally efficient JIT. So you’d need someone of that class of skill to decide to make that their legacy.
- lifthrasiir 2y agoAnd it's not like that Bellard is unable to produce a JIT compiler; see, for example, QEMU dyngen [1] which eventually inspired CPython's new JIT compiler. [1] https://www.usenix.org/legacy/event/usenix05/tech/freenix/full_papers/bellard/bellard.pdf https://www.usenix.org/legacy/event/usenix05/tech/freenix/fu...
- rfoo 2y agoLike other replies said, having JIT requires quite different tradeoffs to be made. And unfortunately, making a very fast interpreter-based JS engine is a tedious and human-power-heavy work, it involves a lot of work which can't be eliminated by better skills.