I seem to recall an online script that refactors JavaScript for the purpose of optimization (i.e, make it run faster).
I am not asking for a link nor information pertaining ‘minifying’ the code (and in broader terms, I am not talking about the load time for JavaScript). I am asking if there is a script that optimizes a JavaScript program.
I am under the impression that good C compilers optimize code, so it seems that some methodology would have came to be for optimizing JavaScript over the years. Is there such a service? And does such a service exist that is similar to ‘minify’ in the sense that it is an online service that you feed your JavaScript code in – and it spits out the optimized version?
No there are no javascript programs that optimize the code in sense of algorithmic optimize. Unlike compilers that do complex calculation base on information theory (they eliminates unnecessary loops, removes not used variables…..a lot of things) for optimizing the final machine code, Javascript is an interpreted(on the fly) language, and it’s optimization is done by the javascript engine of the browser. Actually Google Chrome javascript engine seems to be the fast.