4 ms·
What about PyPy? It generates native (JIT) code and run as fast as C.
by cia48621793 11y ago
What about PyPy? It generates native (JIT) code and run as fast as C.
- hamstergene 11y agoJust because something generates native code does not mean it "runs as fast as C". Semantics of a particular language can force it to do more job without any chance to optimize that away. For example, if you modify C compiler to make integer operations clamp at min/max rather than overflowing, it will always be times slower than original at number crunching, and there would be no way to overcome that.
- overgard 11y agoPyPy is an amazing project, but if you're really writing performance sensitive code then relying on the heuristics of a JIT is a dangerous game. There are also a lot of things that PyPy's JIT just can't realistically optimize.