3 ms·
Just did a quick check, and looping over an array of 1 million Nones and checking each element el==None was roughly 25% slower than el is None edit: Doi
by dagw 6y ago
Just did a quick check, and looping over an array of 1 million Nones and checking each element
el==None
was roughly 25% slower than
el is None
edit: Doing
None==el
was roughly 15% slower