Message291461
Length hints were intentionally omitted from the Python 3 map() and filter() which used to be in the itertools module. I explored that notion of iterator length transparency years ago. While I don't remember all the details, I did record some notes at the top of Lib/test/test_iterlen.py.
BTW, I also don't think the list(map(...)) or list(filter(...)) case is worth optimizing. For big inputs, manifesting the whole input into a list is usually (but not always) the wrong thing to do if you care about performance (throwing away the iterator's superb L1 and L2 cache performance and throwing away the memory efficiency). |
|
Date |
User |
Action |
Args |
2017-04-11 04:45:13 | rhettinger | set | recipients:
+ rhettinger, terry.reedy, vstinner, alex, serhiy.storchaka |
2017-04-11 04:45:13 | rhettinger | set | messageid: <1491885913.5.0.801951377504.issue26828@psf.upfronthosting.co.za> |
2017-04-11 04:45:13 | rhettinger | link | issue26828 messages |
2017-04-11 04:45:13 | rhettinger | create | |
|