As it is a “Load and Go” system so it does not offer any time for optimizing. Optimizing and compiling and do wonderful things to make codes go faster but it takes many minutes to do that work and we do not have much time on the web. However, it is said because,
- ECMAScript programs are expected to start execution instantly.
- ECMAScript does not specify an executable format or a virtual machine.
- There is a tradeoff between off-line optimization and portability.
- Portability is the web’s most valuable feature as Portability is the single best that web has over all other applications delivered to systems.
- Failed security model
- Lack of portability (write once, debug everywhere)
- Awful UI Toolkit
- Horrendous startup times (class-loading)
However none of these problems were tend to be considered as big problems on the server so that it has been used there without having any issue.
Now, there is a question that how fast are the new engines? That is really a complicated question to answer. There might not be any single member who could answer the question that how fast is the language processer. It depends on what programs are giving and every program can have a different looks and features, which may explore some specific benefits as same benefits might be a drawback in certain conditions so we never know the answer but the best we can do is to benchmark. Benchmark promotes patterns that engine implementers want to implement and also promote the patterns that resemble benchmarks. But the benchmarks are not the representative of real program.
The engine makers are tuning to the benchmarks, struggling to produce the best numbers because the performance without the measurement is completely meaningless and they do not know what else to do. Now, it is contrasted that the life on the web. Web developers have a difficult time with the browsers and desire to produce applications that are highly response. Browser platform contains some deep inefficiency and if you run through those inefficiencies, your application will be seriously deteriorating as little visibility into the cause of performance degradation.
According to Mr. Donald E. Knuth, premature optimization is the root of all evil and it is an absolute fact. However, the web developers believe that they must optimize prematurely because they will not be given a chance to do it later. In order to make a selection between two language features, put each in a loop and run 1000 times. Always use the winner, even if:
- The difference was not significant
- The race is likely to go the other way in future versions
- This results in code that is more difficult to read or maintain