News for hackers. Stuff that matters.
Re:Key differences between Python 2.7.x and Python 3.x (2014) by xapata on Monday May 08, 2017 @01:18AM (#14289408)
Depends on many things. What task are you trying to accomplish?
Re:Key differences between Python 2.7.x and Python 3.x (2014) by omginternets on Monday May 08, 2017 @02:25PM (#14294217)
In any non-contrived example, CPython's callback code will be slower than equivalent JIT-ed code from v8.

Please don't play the "it depends" card just to be smug. It lowers the level of discourse.

Re:Key differences between Python 2.7.x and Python 3.x (2014) by xapata on Wednesday May 10, 2017 @04:47AM (#14306810)
I ain't being smug. If I were, I might use fancy words like "discourse". But we're not playing cards here, are we?

JIT-ed code can be pretty fast, but so can calls to libraries like NumPy. PyPy can also be somewhat speedy, though it hasn't had as much dev time as v8. And if you somehow find yourself breaking new ground with an algorithm no one's written a fast implementation of yet, there's always Cython.

Besides, if there's any task that takes more than a negligible amount of time, I usually push it to a different process and respond immediately. The callback speed in that case is bound by the time it takes to write to a message queue or append to a database table, not the language itself.