On Wed., 18 Dec. 2019, 5:51 am Tim Peters, <tim.pet...@gmail.com> wrote:

> But there are also other optimizations in the current set
> implementation, so "fine, add the doubly linked list to sets but not
> to dicts" is only part of it.
>
> Which may or may not be possible to match, let alone beat, in an
> ordered set implementation.  A practical barrier now is that Python is
> too mature to bank on loving optimizations _after_ a change to a core
> feature is released.  It's going to need a highly polished
> implementation first.
>
>
Starting with "collections.OrderedSet" seems like a reasonable idea, though
- that way "like a built-in set, but insertion order preserving" will have
an obvious and readily available answer, and it should also make
performance comparisons easier.

Cheers,
Nick.

______________________________
>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/YBKI7QVH2X3RIBJQ76BCN3WCSJUDWGWM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to