4 ms·
My takeaway is that unoptimized c++ is pretty close to the same performance as JavaScript. Wild.
by claytongulick 4y ago
My takeaway is that unoptimized c++ is pretty close to the same performance as JavaScript.
Wild.
- igouy 4y agofwiw https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-gpp.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- deleted 4y ago[deleted]
- claytongulick 4y agoYep, I don't have the energy tonight to inspect the source code, but how you write js matters a lot. Little things like hoisting local variables out of the prototype and closure chains can make a massive difference. I did some experiments with hot path js optimization several years ago and was pretty surprised at the performance you can squeeze out of the jitter. Js is notorious for being difficult to do good perf analysis on because of the warming and hot path analysis. From my experiments it can sometimes take many seconds from startup for the jitter to kick in on a tight loop.