for (int i = 0; i < 5; ++i) //...for (int i = 0; i < 5; ++i)
#include <QtCore/QCoreApplication>#include <QTime>#include <QList>#include <list>#define IS_STLint main(int argc, char *argv[]){ QCoreApplication a(argc, argv); QTime stopwatch; stopwatch.start(); #ifdef IS_STL std::list<int> list; for(int i = 0; i < 10000000; i++){ list.push_back(i); } #else QList<int> testList; for(int i = 0; i < 10000000; i++){ testList.append(i); }#endif printf("%d\n", stopwatch.elapsed()); return a.exec();}