3 ms·
No, hashing is part of the O in O(1). For pathological cases O(n) could be faster than O(1), but fast hashing is fundamental to Python performance, so I expect
by russell 17y ago
No, hashing is part of the O in O(1). For pathological cases O(n) could be faster than O(1), but fast hashing is fundamental to Python performance, so I expect it to be fast.