Skip to main content
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 ...
Jörg W Mittag's user avatar
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 ...
Jörg W Mittag's user avatar
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 ...
Karl Bielefeldt's user avatar
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 ...
el.pescado - нет войне's user avatar
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. ...
Jörg W Mittag's user avatar
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 ...
amon's user avatar
  • 135k
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 ...
Robert Harvey's user avatar
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 ...
gnasher729's user avatar
  • 47.5k
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 ...
Jules's user avatar
  • 17.8k
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 ...
Doc Brown's user avatar
  • 214k
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 ...
Lie Ryan's user avatar
  • 12.5k
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 ...
juhist's user avatar
  • 2,579

Only top scored, non community-wiki answers of a minimum length are eligible