4 ms·
This is also related to the "sufficiently smart compiler" argument - to have a Python compiler that can produce output equal to C, it would basically have to ou
by userbinator 13y ago
This is also related to the "sufficiently smart compiler" argument - to have a Python compiler that can produce output equal to C, it would basically have to output nearly identical binaries to ones that an expert C programmer and compiler would produce. That looks to me to be an almost practically impossible task, since there are so many things you can do in C, which can improve performance drastically (e.g. avoiding dynamic allocation, pointer tricks, etc.) and simply can't be done in Python code, "Pythonic" or otherwise, and it would have to recognise and apply all of these rules. Even with C -> Asm which is a far more direct mapping, and on which a great deal of effort has been expended, the compilers still have nowhere near the intelligence to make use of the machine's instructions in a way an Asm programmer would.