Guido Imperiale <crusade...@gmail.com> added the comment:

Of course, the chances that in real life a custom object will have hash == -2 
are very small. Different story however is for the actual numbers -1 and -2:

In [2]: %timeit {-1, -3}                                                        
                                                                                
                                                                
64.2 ns ± 1.41 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)

In [3]: %timeit {-1, -2}                                                        
                                                                                
                                                                
238 ns ± 5.64 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38105>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to