Message51399
intobject.c:int_nonzero() gets called 100 times more than that
in the same test run. Actually all builtins go through the
fast slots machinery and not slot_nb_nonzero() so I'm not
worried about speed (if there is any to be had).
I tried adding a nb_bool to listobject.c (currently it falls
back on tp_as_mapping->mp_length) and I couldn't tell the
difference with
./python Lib/timeit.py "if [] or [] or [] or [] or [] or [] or [] or [] or []: pass"
So it looks like the places that matter are already fast.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:55:24 | admin | link | issue1600346 messages |
2007-08-23 15:55:24 | admin | create | |
|