Unity - 20 times faster than traditional javascript?

How is this benchmark mentioned in script compilation done exactly?

http://docs.unity3d.com/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html

Not sure, however, Javascript used to be more interpreted, meaning the runtime was slowed as it tried to understand what it’s doing next. Now-a-days this isn’t so true, some of the javascript depending on the backend engine(in the browser or whatever) will compile it to native.

Check out this post on javascript being interpreted or not.

With all that said, your unity script/javascript is actually built into a .net assembly and loses it’s whole javascripty form in the end, so the notion that it’s actually javascript/unity script once build is completely wrong.

If you need proof, go get something to reflect the assembly(Redgate’s Reflector, Telerik Decompile).