by romanovcode · 9y ago · 0 comments
Does anyone with high performance requirements writes JS? Isn't that setting yourself up for failure on the first step?
You assume that "high performance" is the only requirement, so that it dictates everything.
People also have other requirements like "it has to run on a browser/on the web" etc AND high performance.
It's not like HPC people suddenly rush to use JS. But there are people targeting the web/node etc that DO want as high performance as they can get away with (e.g. web games).
It's possible to call into C from Node. So there's nothing stopping you from implementing performance-critical parts of a system with native code, and then invoking it from JavaScript.
There's a big number of startups that used Node for their back-end, if it becomes faster without them having to rewrite their codebase, that's a win too.
We have JS that we use client side that we also use server side for Hadoop processing of data. So we didn't want to rewrite and maintain this large codebase in both Scala/Python and JS, so we ran Node on Hadoop.
No, it really isn't setting yourself up for failure if you do it correctly. Node really is quite fast; for our use case it rivaled Java 8 runtime in MR CPU time, the only downside is it had double the memory footprint. With enough hardware, memory is not too much of an issue.
It bothers me that people still think JavaScript is slow. I think JavaScript(engines) is the only languages which is getting significant performance improvement on monthly basis since V8 was introduced.
It is the abstraction people in JS/Frontend world people are used to, make it seem slow.
I always say use the best tool for the job. And this usually means getting the requirements then laying out the solutions and picking the best solution out of the bunch.
And yet there are a plethora of cases where all of those languages have been used with high performance requirements.
How about you needing performance AND web compatibility?