4 ms·
Speaking about benchmark. Node vs Lua shows Node faster than Lua. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-lua.html https://ben
by phantomathkg 8mo ago
Speaking about benchmark.
Node vs Lua shows Node faster than Lua.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-lua.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Node vs C, only 4 to 5 times slower.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-gcc.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Looking at its root, it is not too bad as a JIT compiled language.
- xigoi 8mo ago“Only” 5 times slower? Imagine if every website that takes 10 seconds to load instead took 2 seconds…
- curtisblaine 8mo agoYou know that CPU-bound performance would take a really small fragment of those straw man 10 seconds loading a page, right?
- xigoi 8mo agoIf you think 10 seconds is a strawman, clearly you haven’t used sites like GitHub on a cheap device.
- iso1631 8mo agoBut that's not the javascript, it's how it's used (react or whatever) You can write terrible non-performant code in assembly and C, and perfectly speedy pages in html and javascript (say the page you're on at the moment). You wouldn't write a new cutting edge video codec in javascript - not one you wanted to use anyway - but given that we had performant guis running on 286s at 12MHz, Javascript being 1/10th the speed of C isn't the problem.
- curtisblaine 8mo agoCase in point, github is server side rendered. I don't think it uses any client side framework.
- xigoi 8mo agoTry opening it with JavaScript disabled and you will see exactly how much is server-side rendered.
- wiseowise 8mo ago> “Only” 5 times slower? Imagine if every website that takes 10 seconds to load instead took 2 seconds… All you need to know about the level of knowledge of average JS hater/muh native performance.
- igouy 8mo agoNow, instead-of hand-written vector instructions, look at programs transliterated line-by-line literal style into different programming languages from the same original: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/comparable.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...