Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's because Python 2 has a special case for lists[1]. This does not exist in Python 3[2] (and therefore neither does the performance difference).

[1] https://github.com/python/cpython/blob/2.7/Python/ceval.c#L1...

[2] https://github.com/python/cpython/blob/master/Python/ceval.c...



It looks like list access got slower as a result though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: