我正在研究的数据集的一些特征特征显示了以下趋势:
- Will it be effective if I replace the insertion sort part with shell sort?
- Does the occurrence of turtles matter so much that I should ditch Timsort in favor of this Comb sort variation - [here](http://en.wikipedia.org/wiki/Comb_sort#Combsort_with_different_end). Their best case performances show O(n) but avg case performance is better for Tim sort with O(n log n), whereas Comb sort has Ω (n log n) but does this take the modified version of Comb sort or density of turtles into account?
- Can this be done by pulling out after a certain recursion depth in Quick sort to place the elements approximately near their deserved place.
如果是相关的话,下面是我正在尝试修改的Timsort 代码。
发布于 2012-10-07 12:02:25
我认为最好的答案是,无法可靠地预测自定义TimSort是否会为您的数据集带来有价值的性能改进。你只要试试看就行了。
我将从我的评论中重复我的建议:先把它描述一下!
在对运行在具有代表性的数据上运行的应用程序进行分析之前,您无法知道这是否有可能有所帮助。例如,如果计算只花费5%的时间对数据进行排序,那么排序算法的50%的加速比只会导致应用程序加速2.5%。这根本不值得浪费你的时间。
https://stackoverflow.com/questions/12767750
复制相似问题