▲ | Animats 4 days ago | |||||||||||||||||||||||||
I used to argue with the Python crowd about that. In Python, any code can, if it works at it, find and mess with any data object anywhere, even in another thread. So the compiler can't examine a function, decide that it can't possibly do something, and optimize. That's held back PyPy. Most useful Python programs could be hard-compiled to machine code, because they're not doing anything weird enough to require a JIT compiler. But some low-level library might be, which breaks hard compilation. ("But then my domain-specific language / interface to another language / code generator / tracing package / debugger won't work!") | ||||||||||||||||||||||||||
▲ | somat 4 days ago | parent [-] | |||||||||||||||||||||||||
If the compiler is examining the function to know what to optimize. why does it not know what that function does so it can't optimize? That is, I assume you are correct but you lost me in the logic. is it eval? | ||||||||||||||||||||||||||
|