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?
Tim Peters invented timsort for Python ab
On Sun, 6 Jun 2021 at 11:57, Christian Heimes 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 tha
On Sun, Jun 6, 2021 at 2:46 AM 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?
>
As you already know, timsort is pretty close to merge sort.
Timsort added the innovation of making mer
On Sun, Jun 06, 2021 at 04:07:57PM -0700, Dan Stromberg wrote:
> I've got a comparison of sort algorithms in both Cython and Pure Python (your
> choice) at:
> https://stromberg.dnsalias.org/~strombrg/sort-comparison/
> ...including a version of timsort that is in Cython or Pure Python.
>
Interes
On Mon, 7 Jun 2021 06:49:24 -0700
Senthil Kumaran wrote:
> On Sun, Jun 06, 2021 at 04:07:57PM -0700, Dan Stromberg wrote:
> > I've got a comparison of sort algorithms in both Cython and Pure Python
> > (your
> > choice) at:
> > https://stromberg.dnsalias.org/~strombrg/sort-comparison/
> > ...inc
On Sun, Jun 6, 2021 at 7:09 PM Dan Stromberg wrote:
> I've got a comparison of sort algorithms in both Cython and Pure Python
> (your choice) at:
> https://stromberg.dnsalias.org/~strombrg/sort-comparison/
> ...including a version of timsort that is in Cython or Pure Python.
>
Thanks for sharing
[Dan Stromberg ]
> ...
> Timsort added the innovation of making mergesort in-place, plus a little
> (though already common) O(*n^2) sorting for small sublists.
Actually, both were already very common in mergesorts. "timsort" is
much more a work of engineering than of insight ;-) That is, it
combin
On Mon, Jun 7, 2021 at 11:20 AM Tim Peters wrote:
> [Dan Stromberg ]
> > ...
> > Timsort added the innovation of making mergesort in-place, plus a little
> > (though already common) O(*n^2) sorting for small sublists.
>
> Actually, both were already very common in mergesorts. "timsort" is
> much