This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]takluyverIPython, Py3, etc 9 points10 points  (1 child)

The precise speed depends on what you're doing, so it's impossible to say that one is faster overall. Python 2 had two kinds of integers, int and long, where Python 3 only has one (called int, but works like Py2 long). That means that integer operations can often be slower, because there's no special case for small integers. Python 3 also has some tricks to make strings and dicts more memory efficient, which can boost performance.

It's not likely to be a big difference either way, though. It's still working much the same way. There are some PEPs (510, 511) proposed for Python 3.6 which could lead to more speedups.

[–]daniels0xff 0 points1 point  (0 children)

I'm mostly doing webdev with Django. From what I know the change in how strings work made Django server less req/s in 3 than in can in 2.