News for hackers. Stuff that matters.
Re:Ask HN: Why Did Python Win? by dylan604 on Tuesday August 29, 2023 @06:04PM (#37314748)
JIT may not be the correct thing to call it. At least in my head, any script that doesn't need to be compiled by the dev or the user before running is JIT. It's the scripting vs building difference to me. If that's not correct, then I'd love to be corrected.

Here's my reference:

https://en.wikipedia.org/wiki/Just-in-time_compilation

Re:Ask HN: Why Did Python Win? by floxy on Tuesday August 29, 2023 @06:09PM (#37314794)
Interpreter vs. Compiler might be closer to the distinction you are looking for:

https://en.wikipedia.org/wiki/Interpreter_(computing)

Re:Ask HN: Why Did Python Win? by dylan604 on Tuesday August 29, 2023 @06:37PM (#37315061)
Thanks. "My interpreter doesn't care about white spaces, why should I" being something that should have clued me in.
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.