5 ms·
When will such goodness come to JavaScript engines? I’m curious if there is some fundamental design flaws that made JavaScript difficult to optimize.
by low_tech_punk 3y ago
When will such goodness come to JavaScript engines? I’m curious if there is some fundamental design flaws that made JavaScript difficult to optimize.
- Jasper_ 3y agoJavaScript engines have been using inline caches and specialization for over 10 years now. It's Python that's catching up to JavaScriptCore from 2007.
- formerly_proven 3y agoI mean JavaScript is definitely gross to optimize, if you'd design a language for easy optimization and jitting it would look different. Python is just way worse, especially because of the large and rich CPython C API, which used invasive structures almost everywhere (it has been slowly moving away from that). The CPython people, GvR in particular, always considered it very important for the codebase to remain simple as well, and it is. CPython is a really simple compiler and straightforward bytecode interpreter.
- esaym 3y agoNode.js has been on par with Java for many years now due to the Jit and tons of money google has pumped into that ecosystem: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/binarytrees.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- shepardrtc 3y agoJava: 2.52s Node.js: 6.37s I don't know if I'd call that on par.
- igouy 3y agoOr just make one comparison https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/javascript.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- kmod 3y agoFunny that you say this, the more common view I've heard is "we made JS way faster why can't we do that for python". I believe I heard Mark Shannon (one of the lead devs on Faster CPython) say this at one point.