23
votes
Why hasn't Python been optimized like modern Javascript implementations?
Why doesn't Python have these?
I'm not sure why you think there are no Python implementations that care about performance. PyPy, IronPython, and Jython are all industrial-strength, production-ready ...
9
votes
Accepted
How does a JIT compiler actually emit and then call the emitted native code?
If I was writing a normal compiler, I couldsimply write the desired binary to a file, to be run later by the system in whatever manner it usually would be, but how would a JIT compiler do that during ...
7
votes
Accepted
Why do we oppose AOT and JIT compilation. Can they be complementary?
You're talking about profile-guided optimization. The Scala native AOT compilers I've seen employ PGO do so in two stages. Basically, the first pass instruments the code to generate a profile file ...
7
votes
Why hasn't Python been optimized like modern Javascript implementations?
Modern Javascript implementations like V8 (Chrome), SpiderMonkey
(Firefox), and Chakra (IE/Edge) all have JIT compilation, and a number
of other optimizations to improve performance.
Why ...
6
votes
Accepted
Do JITs typically have their own internal assembler, use a library, or use an executable assembler?
"there is no widely accepted best approach and all of these approaches are used by major JITs"
There is no widely accepted best approach and all of these approaches are used by major JITs. ...
3
votes
Accepted
What EXACTLY can the Java JIT do?
No, there no upper bound on the optimizations a JVM is allowed to perform. Therefore, it is not fundamentally possible to prevent optimizations. Instead, strongly prefer using functions from the Java ...
2
votes
Why do we oppose AOT and JIT compilation. Can they be complementary?
You seem to be missing a critical aspect of JIT: platform independence. As soon as you compile down to machine code AOT, your program isn't platform-independent anymore.
That said, the .NET ...
2
votes
How does a JIT compiler actually emit and then call the emitted native code?
The reality on a modern operating system is that you can't just run any compiled code, you need the operating system to give you permission for that. For example, on MacOS getting that permission will ...
2
votes
What EXACTLY can the Java JIT do?
No conforming JVM can perform an optimization that would cause the order of side effects as specified in the language definition to change. Any other optimization is available to it.
In your ...
1
vote
Accepted
How modern runtimes handle both interpreted and JITted code at the same time?
I don't know how it is solved in the Java environment, but here is an idea for an approach which might work for you.
When the JIT compiler compiles a function, it could provide two entry points:
one ...
1
vote
Why do we oppose AOT and JIT compilation. Can they be complementary?
Yes. It's possible and quite common for a program to be recompiled three times:
At the developer's machine, the code is compiled to an intermediate language code. This is a form of the code that's ...
1
vote
What EXACTLY can the Java JIT do?
You are doing it with needless complexity.
Firstly, you have a complex SQL query, which should be avoided. Your business logic should not be written in SQL. I would use SQL just for queries and ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jit × 34compiler × 14
java × 7
performance × 5
interpreters × 5
javascript × 4
optimization × 4
compilation × 3
aot × 3
c++ × 2
android × 2
assembly × 2
x86 × 2
bytecode × 2
c# × 1
.net × 1
programming-languages × 1
c × 1
asp.net × 1
loops × 1
python-3.x × 1
scripting × 1
virtual-machine × 1
garbage-collection × 1
dynamic-typing × 1