News for hackers. Stuff that matters.
Re:Why Python Is Slow: Looking Under the Hood by JoeAltmaier on Tuesday November 18, 2014 @07:11PM (#8627297)
Its hard to be worse than an interpreter. 100X slower than compiled code is typical. Whatever 'metadata and indirection' your C target has, it seems likely to be 10X better than interpreted, easily.
Re:Why Python Is Slow: Looking Under the Hood by dagw on Wednesday November 19, 2014 @03:43AM (#8628912)
Cython is a very mature python-to-C translator and it offers 0-40% speed improvements in my experience on straight Python. To get any significant speedups you have to add type declarations, replace python function with equivalent C functions from the standard library, turn off bounds checking and bunch of similar things. But if you do that then it does produce some pretty fast code.
Re:Why Python Is Slow: Looking Under the Hood by dragonwriter on Tuesday November 18, 2014 @07:30PM (#8627400)
> Its hard to be worse than an interpreter.

Its actually quite easy to be worse than an interpreter that is actually a combination of a bytecode compiler and a VM built around the execution model of the language it is for, which is what the main Python interpreter is.

Re:Why Python Is Slow: Looking Under the Hood by JoeAltmaier on Wednesday November 19, 2014 @10:42AM (#8630584)
Interpreters have to be implemented somehow; that's a way. Its not fast. Its orders of magnitude slower than native code. Even bad native code.