[issue25776] More compact pickle of iterators etc

2016-09-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to pass on this one. It isn't common to pickle iterators, the savings is very small, and some of the code looks less pleasant. -- resolution: -> rejected status: open -> closed ___ Python tracker <

[issue25776] More compact pickle of iterators etc

2016-09-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file44430/iterators_pickle_4.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue25776] More compact pickle of iterators etc

2016-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is synchronized with current sources. Added mandatory braces. -- Added file: http://bugs.python.org/file42077/iterators_pickle_3.patch ___ Python tracker __

[issue25776] More compact pickle of iterators etc

2016-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is the extra special case code for bytes and bytearray iterators and reversed list iterator. The patch just extends the optimizations to other builtin iterators. In the example with itertools.islice() the overhead of pickling redundant data is 20%. If

[issue25776] More compact pickle of iterators etc

2016-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: My first impression is that this isn't worth the extra special case code. The savings is very small (only a few bytes) and it isn't common to pickle these iterators. -- ___ Python tracker

[issue25776] More compact pickle of iterators etc

2016-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I already proposed tests in separate issue. Raymond, could you please look at patches? The touch the code maintained by you: itertools and deque. -- ___ Python tracker

[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file41853/iterators_pickle_tests.patch ___ Python tracker ___ ___ Python-bu

[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch conforms to new tests and to following rule: exhausted iterators of mutable sequences can be replaced with iter(()), non-exhausted iterators can't. -- Added file: http://bugs.python.org/file41854/iterators_pickle_2.patch __

[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch extends tests for pickling iterators of mutable sequences. Now tested iterators in different states: initial (no iterated yet), running (in the middle of iteration), empty (just the last item was emitted) and exhausted (tried to iterate past t

[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file41207/iterators_pickle.diff ___ Python tracker ___ ___ Python-bugs-list

[issue25776] More compact pickle of iterators etc

2016-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add new tests for pickling iterators of mutable sequences ___ Python tracker ___ ___ P

[issue25776] More compact pickle of iterators etc

2015-12-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes a number of classes produce more compact pickle data in common case. This includes iterators of list, tuple, str, bytes, bytearray, enumerate, array, deque, iterator object for classes with __getitem__, some itertools iterators, and no