fast, clean, C, timsort implementation?
- by Drew Wagner
Does anyone know of a clean implementation of timsort?
The Python sources contain a description and code for the original timsort, but it is understandably full of python-specific calls.
I have a smoothly varying 2D array of double floats that I would like to sort as quickly as possible. It ought to contain a lot of monotonically increasing and decreasing runs. I'd like to try timsorting the rows individually, and then merging the sorted rows. If you know of a better sort technique, I'm open to suggestions.
Thanks!