Another timing example
Here is a program fragment int x[100000]; for (int i = 0; i < 100000; ++i) x[i] = i;
What does it cost to replace int x[100000];by vector<int> x(100000);?
Expected a factor of 2; got nearly 5
because of default “debug mode”
Previous slide
Next slide
Back to first slide
View graphic version