3 ms·
One aspect the author doesn't talk about is emulation: The Wii/GameCube emulator Dolphin uses JIT to translate the console's PPC machine code to x86 machine cod
by Kristine1975 11y ago
One aspect the author doesn't talk about is emulation: The Wii/GameCube emulator Dolphin uses JIT to translate the console's PPC machine code to x86 machine code.
I'm also not sure if "scripting languages" truly don't need a JIT. The development of LuaJIT for example has been sponsored by various companies, so there seems to be a need for the fast execution of Lua code: http://luajit.org/sponsors.html http://luajit.org/sponsors.html
- w0utert 11y agoYes, but to be fair, Lua is one of these few examples where JIT makes a lot of sense because the extreme simplicity of the language, which greatly expands the opportunities for a JIT to generate efficient code with relatively low overhead and JIT compiler complexity. This approach is great for some things, but it does sacrifice the flexibility and expressiveness of the language. Anything not part of the core language (which is a lot compared to most other programming languages, e.g. anything related to OOP, or more advanced data types than strings, floats and tables) has to be re-invented and/or bolted-on, which IMO makes it unsuitable for most kinds of applications. This should not be interpreted as critique about Lua the language bu the way, I'm a big fan of Lua for embedded scripting and I generally love tools with a narrow focus (as opposed to kitchen sink technology). I would not choose Lua for anything besides embedded scripting though.
- outworlder 11y agoWhat would you choose instead?
- w0utert 11y agoThat all depends on the application, I guess ;-) Usually I end-up using Python for smaller things that aren't mission-critical or need maximum performance, C++ for almost everything else, and Objective-C for OS X/iOS stuff. Maybe Java for things where both performance, safety and ease-of-development/maintenance matter (the latter would be mostly for other people who would have to work on the same projection who are less skilled in C++, as I'm not at all a fan of the language myself, but I recognize it has some properties that make it a suitable choice for many kinds of applications ;-). I don't have enough experience with any other programming languages that can be deployed easily across Linux and OS X, so I can't comment on those. Rust seems to have some good ideas so I may want to learn more about it in the future. If I wanted to write something for Windows platforms I'd most likely gravitate towards C#, from what I know about the language it appears to have all the good things of Java without its downsides.