4 ms·
Pardon my ignorance, but does Node improve as the V8 engine (or Microsoft's Chakra engine) improves? Also, when/if GraalVM becomes public, would Node then be m
by rajangdavis 10y ago
Pardon my ignorance, but does Node improve as the V8 engine (or Microsoft's Chakra engine) improves?
Also, when/if GraalVM becomes public, would Node then be more suitable for CPU intensive apps?
I love javascript but never quite grok'd it as a server side language. I wouldn't mind using it, but have never found a good use case and this article hasn't really convinced me to delve into it.
Edit: I have found that it has been pretty neat for some command line integrations, but lately, I have been falling back to Ruby.
- nrjdhsbsid 10y agoYeah but I doubt it will ever hit parity with c#/Java/go. The lack of static typing and other fundamental languages choices will keep it from ever being as fast as those. V8 and friends were built out of necessity not because js was ever a good lang to begin with. I really have no idea why anyone would take a language as terribly designed as JavaScript and try to put it everywhere. Non existant typing system, crazy semantics, and lack of true multithreading will always make it second rate to the others
- rajangdavis 10y agoActually, I could be mistaken, but Node on top of GraalVM should give it closer parity with Java. I saw this video (https://www.youtube.com/watch?v=lYGfD2H99Ls https://www.youtube.com/watch?v=lYGfD2H99Ls) earlier this year, would be interested to see when and if this could be implemented in the mainstream.
- nrjdhsbsid 10y agoV8 does almost everything JVM does, the problem is mostly in js dynamic typing and weak object implementation. There's a lot of runtime checks that just can't be optimized out. I would expect js to reach maybe a third of JVM performance but thats probably the limit
- EdSharkey 10y agoIf you write your javascript in a way that is easy for V8 to JIT, then I think you'll benefit most from progressive enhancements made in the underlying engine. There's a lot of talks and articles on V8 performance, for example: http://mrale.ph/v8/resources.html http://mrale.ph/v8/resources.html Surprisingly, very boring, predictably shaped prototypey classes written in the "hidden classes" style they prescribe will JIT compile amazingly well. I think a lot of the fancy uses of JavaScript to roll types with mixins and traits or simply to sidestep needing the 'new' keyword to instantiate objects miss out on lots of performance benefits on V8. Honestly, where does all the hate for 'new' come from? Prototypey classes work fine once you understand how to roll them/extend them, and 'new' is a real keyword in the language, what's to hate?