This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients corona10, rhettinger, vstinner
Date 2021-02-21.18:40:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
+0 I don't see any downside.

Note, the benchmark only times instantiation of the filter object.  It doesn't actually run the iterator which is where most of the runtime cost is spent.  So in actual code there is almost zero benefit.  For example, add "list" to the statement:   stmt="b = list(filter(lambda x: x % 2 == 0, a))" and the improvement disappears.
Date User Action Args
2021-02-21 18:40:56rhettingersetrecipients: + rhettinger, vstinner, corona10
2021-02-21 18:40:56rhettingersetmessageid: <>
2021-02-21 18:40:56rhettingerlinkissue43287 messages
2021-02-21 18:40:56rhettingercreate