diff --git a/test/kvec_test.cc b/test/kvec_test.cc index 1015574..13490a2 100644 --- a/test/kvec_test.cc +++ b/test/kvec_test.cc @@ -53,8 +53,7 @@ int main() t = clock(); for (i = 0; i < M; ++i) { std::vector array; - array.reserve(N); - for (j = 0; j < N; ++j) array[j] = j; + for (j = 0; j < N; ++j) array.push_back(j); } printf("C++ vector, preallocated: %.3f sec\n", (float)(clock() - t) / CLOCKS_PER_SEC);