5 ms·
In your example of reversing decreasing runs, you dropped a 9.
by Anm 8y ago
In your example of reversing decreasing runs, you dropped a 9.
- bbno4 8y agoThank you so much!
- czr 8y agoanother minor typo: > do the merging as soon as possible to exploit the run that the run just found is still high in the memory hierarchy s/run/fact/ if I'm reading correctly for the python timsort, the original source code is here: https://svn.python.org/projects/python/trunk/Objects/listobject.c https://svn.python.org/projects/python/trunk/Objects/listobj..., although porting it to idiomatic python definitely seems nontrivial
- jwilk 8y agoPython is using Git these days: https://github.com/python/cpython/blob/master/Objects/listobject.c https://github.com/python/cpython/blob/master/Objects/listob...
- czr 8y agoOops, thanks! That's much better. Not sure why I stumbled on the svn link first.
- czr 8y agoAlso, it looks like the pypy implementation is here: https://bitbucket.org/pypy/pypy/src/default/rpython/rlib/listsort.py?fileviewer=file-view-default https://bitbucket.org/pypy/pypy/src/default/rpython/rlib/lis...