2015-10-27から1日間の記事一覧

C++/C言語の実行時間計測

C++

したい。 関数によってミリ秒だったり秒だったり、OSによって実時間だったりCPU時間だったりする点に注意。 #include <iostream> #include <vector> #include <chrono> #include <time.h> int main() { const int size = 1000 * 1000; //C++11版, ミリ秒単位、実時間ベース std::vector<int> x; auto</int></time.h></chrono></vector></iostream>…