fast, clean, C, timsort implementation?

Posted by Drew Wagner on Stack Overflow See other posts from Stack Overflow or by Drew Wagner
Published on 2010-03-31T22:30:50Z Indexed on 2010/03/31 22:33 UTC
Read the original article Hit count: 716

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about timsort

Related posts about sort