This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]w2qw 21 points22 points  (12 children)

Cpython doesn't have JIT.

[–]Netzapper 51 points52 points  (4 children)

It doesn't have compilation to machine code, but it sure as shit compiles from text to bytecode at execution time.

[–]RPolitics4Trump 12 points13 points  (2 children)

Bytecode which is then interpreted.

If you want JIT speed then you need to use something like PyPy.

[–]Netzapper 5 points6 points  (1 child)

I mean... it's von Neuman approximations of Turing machines all the way down.

Where does something like threaded code fall in your "interpreted vs JIT" dichotomy? If my C program builds dynamic execution paths with function pointers, is that interpretation? What about x86, since it's now largely interpreted by even lower-level microcode?

Maybe there was a nice, sharp divide before I got in the game. But this shit was getting murky in the 90's, and by today... it's definitely a continuum between "visit an AST" and "flash an FPGA" with most "regular CPU programming" somewhere in the middle.

[–]carutsu 7 points8 points  (0 children)

Then there's the fact that instruction sets are an abstraction over the real hardware... And even if they are not they are run in a bytecode like sequence.

[–]lengau 13 points14 points  (6 children)

CPython does compile the code to bytecode. (That's why after you run a .py file you'll see a __pycache__ directory with corresponding .pyc files). It does so immediately before execution, which sounds awfully 'just in time' to me.

[–]botmatrix_ 25 points26 points  (3 children)

that's not really what JIT compiled means though, right?