Open SoniEx2 opened 5 years ago
As a matter of policy we have so far not done JITted languages. Most of these languages require you to run a representative data set long enough to "warm up" the JIT to get output comparable to static compile output, and I'd hate for CE to become a "look how bad JITted language output is compared to static compiled".
See also #1058 which I'll opine in too.
This issue is not about JIT output. Granted I did list 2 JITs, but mainly because they're designed to have portable bytecode (LuaJIT broke that with the 64-bit GC recently, but w/e, still mostly portable).
That is, Java bytecode, LuaJIT bytecode, optionally Lua (5.1/5.2/5.3) bytecode (output from luac -l -l -o /dev/null -
) on different platforms (x86 vs x86_64), etc.
Understood! Reopening for that. See also #12
@SoniEx2 You might like https://github.com/mejedi/luajit.me
This is a tricky issue. I think the best way to handle this is probably something like for C# have ".NET 5.0" that displays bytecode and "Mono AOT 6.12.0" that displays the assembly generated by mono --aot
. The "AOT" should hopefully clarify that it isn't representative of Mono as a whole, and it not being the default should hopefully clarify that it isn't representative of the language as a whole.
While I don't think this is a problem for either Lua or Java, for C# versioning could be a bit tricky. The only major C# compiler is Roslyn. However, from my understanding:
For C# specifically, Mono has several optimizations that are disabled by default and only recommended for AOT compilation. The documentation says that mono --aot -O=all
can lead to "potential better performance" compared to plain mono
, but I can't find any benchmarks.
@leo60228 you might be interested in #2592.
Thanks, I've left a comment there.
Some thoughts on Java from Discord:
So, here's the idea to implement JIT output for Java (openjdk/HotSpot JVM):
I would actually like to request Lua non-JIT! Apart from Erlang, Lua's VM is the best known register based VM as opposed to more popular stack based VMs and therefore I am sure lots of people are interested in seeing the bytecode it runs.
Please see this discussion where I'm asking about adding a similar thing https://github.com/compiler-explorer/compiler-explorer/discussions/4700
Would it be possible to have non-machine-code languages, such as Java (JVM bytecode), Lua (LuaJIT bytecode), etc?
(it's also possible to extract JIT output from java but it involves running the program... meh)