快速,干净,C,timsort实现? [英] fast, clean, C, timsort implementation?

查看:252
本文介绍了快速,干净,C,timsort实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道一个干净的C / C ++实现timsort的?

Does anyone know of a clean C/C++ implementation of timsort?

Python的来源包含描述并的$c$c 的原timsort,但它是完全可以理解的特定的蟒蛇通话。

The Python sources contain a description and code for the original timsort, but it is understandably full of python-specific calls.

谢谢!

推荐答案

我写在C快,类似模板的版本:

I wrote a fast, template-like version in C:

http://github.com/swenson/sort

它还包括一堆其他排序算法。 Timsort似乎5%左右打快速排序。

It also includes a bunch of other sorting algorithms. Timsort seems to beat quick sort by 5% or so.

这篇关于快速,干净,C,timsort实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆