On Sun, 6 Jun 2021 at 11:57, Christian Heimes <[email protected]> wrote: > > On 06/06/2021 11.42, Marco Sulla wrote: > > As title. Is it faster for inplace sorting, or simply the > > implementation of list.sort() was done before the implementation of > > timsort? > > list.sort() uses timsort. What makes you think that Python uses mergesort?
In listobject.c, in the comment above list_sort_impl, there's written "An adaptive, stable, natural mergesort". But now I see that after there is "See listsort.txt" where it's stated "This describes an adaptive, stable, natural mergesort, modestly called timsort". > Tim Peters invented timsort for Python about twenty years ago. Tim a > first generation Python core dev. Other languages like Java adopted > timsort from Python later. I know. Thank you for the answer :) > > Christian > > > > _______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/P7XFRAU6GL2CH6RBXPLGXEK4AL5KF2HV/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/BGTTKCM4X6X24V2OZT3UHNHNBZSY5EP6/ Code of Conduct: http://python.org/psf/codeofconduct/
