更改

跳到导航 跳到搜索
删除51字节 、 2020年9月12日 (六) 10:41
第665行: 第665行:  
For large data linear or quadratic factors cannot be ignored, but for small data an asymptotically inefficient algorithm may be more efficient. This is particularly used in hybrid algorithms, like Timsort, which use an asymptotically efficient algorithm (here merge sort, with time complexity <math>n \log n</math>), but switch to an asymptotically inefficient algorithm (here insertion sort, with time complexity <math>n^2</math>) for small data, as the simpler algorithm is faster on small data.
 
For large data linear or quadratic factors cannot be ignored, but for small data an asymptotically inefficient algorithm may be more efficient. This is particularly used in hybrid algorithms, like Timsort, which use an asymptotically efficient algorithm (here merge sort, with time complexity <math>n \log n</math>), but switch to an asymptotically inefficient algorithm (here insertion sort, with time complexity <math>n^2</math>) for small data, as the simpler algorithm is faster on small data.
   −
对于大数据不能忽略线性因子或二次因子,但对于小数据,渐近低效算法可能更有效。这在混合算法中尤其常用,比如 Timsort,它使用一种渐近有效的算法(在这里使用合并排序,时间复杂度数学 n  log n / math) ,但是对于小数据切换到一种渐近低效的算法(在这里使用插入排序,时间复杂度数学 n ^ 2 / math) ,因为更简单的算法在小数据上更快。
+
对于大数据,线性或二次因素不能忽略,但对于小数据,渐近低效的算法可能更有效。这尤其适用于混合算法,如Timsort,它使用渐近有效的算法(这里指归并排序,时间复杂度𝑛log𝑛),但对于小数据,转换为渐近低效的算法(这里是插入排序,时间复杂度为2),因为更简单的算法在小数据上更快。
    
== 参见 See also==
 
== 参见 See also==
463

个编辑

导航菜单