3 ms·
Creating empties with {} takes just 58% of the time as dict() [0.25 us, 0.39 us] because there's no need to LOAD_GLOBAL and CALL_FUNCTION. 'not not variable' i
by ivank 18y ago
Creating empties with {} takes just 58% of the time as dict() [0.25 us, 0.39 us] because there's no need to LOAD_GLOBAL and CALL_FUNCTION.
'not not variable' is similarly faster than bool(variable).
(not that I've run into this often in Python.)
- njharman 18y ago> takes just 58% of the time Whoopee fucking doo, really.