4 ms·
it would be awesome if someone creates a compiler for javaScript.
by notsohuman 9y ago
it would be awesome if someone creates a compiler for javaScript.
- notsohuman 9y agoI mean an actual compiler rather which is much more optimized than node environment rather than just making things into executables
- ComodoHacker 9y agoV8 includes JIT compiler. Could it really be "much more" optimized?
- notsohuman 9y agoI agree V8 does an awesome job buts it compilation phase is not done separate before running. Lot could done to gain the speed in those areas.
- mbel 9y agoPerhaps. JIT compiler has to care deeply for compilation time. For AOT compiler compilation time is a little bit less pressing problem which leaves some space for optimization passes that take too long for JIT.
- perbu 9y agoIf you look at Hiphop vs. HHVM there is certainly a significant performance upside in taking advantage of clangs or gccs ability to produce efficient code. I'm not sure why Facebook decided to stop maintaining hiphop. Perhaps manageability wasn't great.
- notsohuman 9y agothere is always something more that can be done
- perbu 9y agoThis would be pretty useful. Something like hiphop which could transpile into C or C++ would mean we (IncludeOS) could build tooling to run a node application on directly in a vm without a underlying OS.
- _pmf_ 9y agoWhat kind of thread support does IncludeOS offer? Edit: IncludeOS does not offer thread support, so it's unclear how the GC of the JS VM is supposed to run.
- mbel 9y agoArguably there are already couple of popular compilers [0] for JavaScript (Babel, Closure Compiler, minifiers etc.). They just don't target native CPU assembly. [0] Compiler is just a program that transforms code from one representation to another.
- coldtea 9y agoWhy, thank you, Technically Correct Man! http://www.damnlol.com/the-adventures-of-technically-correct-man-68096.html http://www.damnlol.com/the-adventures-of-technically-correct...
- TheRealPomax 9y agoBut a compiler for what? Plain JS without any APIs? JS that uses the Node.js API? JS that uses the Web APIs? The problem with base JS is that it's a general purpose scripting language that lacks some of the basics that you need before you can compile the code as something that can "do a thing" on its own, without still needing an interpreter for the third party APIs the code tries to make use of that rely on out-of-language hooks (like Node.js)