I happened to find myself having a basic filtering need: I have a list and I have to filter it by an attribute of the items.
My code looked like this:
generally filter is slightly faster if using a builtin function.
filter
I would expect the list comprehension to be slightly faster in your case