Open
Description
Hi,
I have some code where unpickling SortedLists and SortedSets takes a significant amount of the runtime of my program (I have a lot of them!)
The problem is, I think, that as __reduce__
just says that set
and key
should be passed to init
, then the iterable values then get fed into self._update
one at a time.
Would it be possible to speed things up, as the iterable is already known to be sorted? I wasn't sure of the best way to do this, one option would be to add a constructor method issorted
, but then that might get used by other people (and maybe incorrectly), and you might not want that?
Metadata
Metadata
Assignees
Labels
No labels