To view parent comment, click here.
To read all comments associated with this story, please click here.
Yes but Java and C# have better defined datastructures. One of the problems with compiling JavaScript is that the central datastructure is essentially a hash-table, which makes it very hard to convert to efficient machine code, though there are several tricks to try anyway and then go back to interpretation if it fails.
It's called Type Inference and has been part of Firefox since the start of 2012:
https://blog.mozilla.org/blog/2011/12/20/major-javascript-enhancemen...
Time to pay more attention to compiler design classes.
Languages != Implementation.
There are native code compilers for C# and Java available.
Even on Windows you can compile C# directly to native code by making use of NGEN.
Are you aware that .NET Windows Phone 8 applications are actually compiled to native code?
Or that there are Java native code compilers for iOS?
And the C# JIT has over a decade of work going into it, and Microsoft's extensive language and compiler experience from even longer than that.
JS doesn't do even a fraction of the optimization even a clumsy C# JIT does. Start doing install-time native compilation of C# and the story gets even better.





Member since:
2010-06-01
Both C# and Java use JIT...