Which programming languages have JIT compilers?
I know C# and Java do. Anyone else开发者_运维问答 know of any others?
Strictly speaking, JIT is a property of the runtime, not the language. Pedantic point, but the implication is that any language that runs on a JVM for example can take advantage of the JVM's JIT. Jython, JRuby, Groovy, etc.
Tamarin has a JIT too. I think this can run JavaScript and ActionScript? Not positive...
Lua has the impressive LuaJIT.
PLT Scheme has had a JIT for some time now.
I believe both of these are limited to x86.
The Just-In-Time Compilation
article on wikipedia lists several more:
- GNU lightning - A library that generates assembly language code at run-time
- Mozilla nanojit - A small, cross-platform C++ library that emits machine code. It is used as the JIT for the Mozilla Tamarin and SpiderMonkey Javascript engines
And several more assemblly emmiters for C++.
As for C# - all .NET languages use the same runtime and jit. VB.NET, C#, F#, IronPython, IronRuby, COBOL.NET and more...
for Python, there is a PyPy project, which it includes JIT (making possible the code to run faster than in CPython in many cases)
There is some confusion on what defines/uses a JIT compiler: is it a programming language? is it a program ? a runtime environment?.
In fact, it is an implementation of a particular programming language which provides a JIT compiler for specific target instruction set architectures (x86, x86_64, PPC, ...).
For example, the SBCL implementation provides a JIT compiler for Common LISP, but other implementations of that language do not (such as CLISP).
Another example, the OpenJDK implementation of the Java virtual machine provides a JIT for some architectures, but not for others (such as ARM) where bytecode is still interpreted.
As a side note: don't forget the Factor programming language. The implementation heavilly uses a JIT compiler.
Not a Julia expert myself, but it is a language that heavily relies on JIT. Many here assert that JIT is purely a runtime implementation aspect of the language; and that is how it was originally conceived. But the design of Julia as a language is heavily influenced and built around JIT, as I understand.
C++ with extra libraries.
the .NET runtime uses JIT so any language hitting that. You can find more info here.
Smalltalk has JIT compilers.
C# doesn't use JIT. C# compiles to CIL for the .NET platform, and .NET uses JIT at execution time.
.NET is much more than just C#. There's also VB.NET, Delphi.NET, Fujitsu Cobol, IronRuby, IronPython, F#, and more. All languages that target the .NET platform make use of the .NET JIT compiler at runtime.
Programming languages doesn't use JIT. Programs use JIT.
C# doesnt have JIT C# is translated to CIL and CIL 'executable' is run JIT.
Dalvik uses Java's syntax, but is compiled to its own bytecode. Dalvik VM is totaly different than Java VM.
Julia has been designed from the ground up to work with JIT compilers.
PHP from version 8.0 has JIT: https://wiki.php.net/rfc/jit
精彩评论