But frankly, if a JavaScript developer ever really wants to solve the problem... Learn enough C++ to write the equivalent code that compiles 6.5M in 0.1 seconds (assuming a nice HD).
But frankly, if a JavaScript developer ever really wants to solve the problem... Learn enough C++ to write the equivalent code that compiles 6.5M in 0.1 seconds (assuming a nice HD).
Traversing that tree to remove unambiguous dead branches seems pretty clear. Perhaps if you get into a tricky manipulation between strings and syntax you could add a little runtime...
Come on man, that's beyond the point. Just because JavaScript needs to be compiled, doesn't mean it has a worse experience than compiling C++.
Instruction ordering is largely bound to instruction pipelining and the estimation of CPU instruction transitioning to reduce latency. Given that V8 uses some degree of virtual indirection... I don't think that's possible in JavaScript.
Believe it or not, some people have problems in domains with contexts that have nothing to do with yours and the things they come up with are equally valid solutions.
Compiling code from C++ to WASM is counter-productive if the native JavaScript is fine. It's just that native languages seem to perform quite a bit better in the domains of graph construction, graph optimization, and even basic string manipulation.
When did WASM come into the picture? I use Parcel because my time is valuable and I don't want to master the arcane arts of modern JS build toolchains but I still NEED to benefit from them if I'm to run a successful business and make sure my investors get their money back and a language I can deliver plain text over HTTP/S that runs performantly across billions of devices that I can modify on the fly is beyond valuable.
> native languages
C++ isn't going to help me deliver my product to my customers in any measurable way that influences the outcome of our relationship. JavaScript, frankly, does - the less time my organization spends writing code, the less we have to charge for things to make up for that margin impact.
Fastpack is a binary JS bundler written in OCaml:
It’s new and missing some features (http://fastpack.io/docs/get-started.html ), but already faster than Webpack / Parcel. It also supports Webpack loaders.