Unity - 20 times faster than traditional javascript?

How is this benchmark mentioned in script compilation done exactly?


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).