Thanks both of you!!!
This all helps greatly!!!
Thanks both of you!!!
This all helps greatly!!!
Crude test confirming it’s faster … by 0.00005 seconds.
It appears that cowboysdude has the reaction time of a fly to be able to “feel” this improvement.
Well, the timing difference is still must smaller than that for strings. It’s only so high because you’re using state_attr. Raw comps will be 0.0000xx seconds. It’ll make a difference if you’re iterating lists. It won’t make a difference if you’re using filters. However, the is none
for filters is smaller than using eq
or ==
, which you typically like.
i.e.
{{ some_list | reject('none') }}
{{ entities | rejectattr('x', 'none') }}
vs
{{ some_list | reject('eq', none) }}
{{ entities | rejectattr('x', 'eq', none) }}
i.e. like 4 characters shorter.