[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: - arbitrary mappings supports by the view ABCs + arbitrary mappings supported by the view ABCs - A first look, + At first glance, -- ___ Python tracker

[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Some thoughts: * Other than set operations, most of the pure python code in the dict view ABCs are fast pass throughs. There is no point in rewriting these in C: def __contains__(self, key): return key in self._mapping def

[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +rhettinger type: -> performance versions: +Python 3.11 ___ Python tracker ___ ___

[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-10 Thread Joshua Bronson
New submission from Joshua Bronson : As suggested by @rhettinger in https://bugs.python.org/msg409443, I'm creating a feature request for C implementations of collections.abc.KeysView, ValuesView, and ItemsView. Because these do not currently benefit from C speedups, they're a lot slower