News for hackers. Stuff that matters.
Re:Ask HN: Why Did Python Win? by felipetrz on Tuesday August 29, 2023 @07:10PM (#37315405)
JIT is a compilation model for interpreted languages, which translates bytecode into machine code in runtime to obtain better performance. The opposite of JIT is AOT (Ahead of Time). JIT languages go through two compilation steps: one to bytecode, and another to native code in runtime. Java is one example of a JIT compiled interpreted language, that also does ahead of time compilation to bytecode, while python compiles to bytecode transparently, but does not do any JIT compilation to native, which is part of the reason it's considered a "slow language" (though this expression doesn't really make any sense, as slowness is a property of the implementation, not of the language).

TLDR:

Java uses AOT bytecode compilation + JIT compilation

Python uses import-time bytecode compilation + slow interpreter

Re:Ask HN: Why Did Python Win? by Phrodo_00 on Tuesday August 29, 2023 @11:23PM (#37317300)
> (though this expression doesn't really make any sense, as slowness is a property of the implementation, not of the language)

Yes, which is why this is the way CPython works, but PyPy uses JIT and is faster.

Re:Ask HN: Why Did Python Win? by felipetrz on Sunday September 10, 2023 @03:07PM (#37458922)
> and is faster.

After a very long warmup time, which may make one-shot applications much slower.