View Single Post
09-24-16, 05:36 PM   #16
EyalSK
A Deviate Faerie Dragon
 
EyalSK's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 13
Originally Posted by SDPhantom View Post
The comparison I'm making is like trying to run a Windows program through Wine on Linux versus running a native Linux version of the same program.
Yes but this is vastly different from what's happening, what happens with WINE is they map the Win32 APIs to Linux APIs so there's a layer of abstraction and sometimes it won't perform as good as native Win32 APIs due to differences in architectures and underlying issues but a transpiler can actually produce much better code then what you would write yourself if not equal to a professional Lua programmer.

Some C++ compilers can transpile C++ into Assembly with a flag and the output is matched with a professional assembly programmer if not more at a time mostly because the optimizer can recognize patterns in the code and replace them with a faster implementation in the final output, there's no reason any other transpiler that takes language X and produces Y can't do the same regardless to the language but it also requires more research and analysis so I don't expect all compilers to have it, definitely not a transpiler of this kind.

Just a note I'm not speaking about producing idiomatic Lua code but mostly on performance, the code can be terribly unreadable but performance can be great these aren't mutually exclusive because I totally agree that the output code he posted is ugly in many ways.

Another good example is TypeScript, the compiler do a great job at producing both idiomatic and efficient JavaScript code but even then it isn't as readable as I would write myself.

One of the things you learn in engineering is to measure, measure, measure and check your facts so maybe you're right but at the same time you likely to be wrong it's all up to the code and the benchmark god.

To me, personally, that Lua code looks like a mess.
I agree but then again it makes him happy and he's fine with it so that's great!

Last edited by EyalSK : 09-24-16 at 09:30 PM.
  Reply With Quote