9 const int iterations = 10000000;
12 auto start = std::chrono::high_resolution_clock::now();
14 for (
int i = 0; i < iterations; ++i) {
16 Point p { (long)i, 1, 1 };
17 total_sum += p.
x + p.y + p.z;
20 auto end = std::chrono::high_resolution_clock::now();
21 std::chrono::duration<double> diff = end - start;
23 std::cout <<
"C++ (Value Type/Stack): " << diff.count() <<
"s" << std::endl;
24 std::cout <<
"Final Sum: " << total_sum << std::endl;