Category Archives: C++博客_春秋十二月

© 2012 . All rights reserved.

为什么处理排序的数组要比非排序的快?

参考Why is processing a sorted array faster than an unsorted array? 问题 看以下代码: #include <algorithm> #include <ctime> #include <iostream> int main() { // generate data const unsigned arraySize = 32768; int data[arraySize]; for (unsigned c = 0; c < arraySize; … Continue reading