-
Code's Tags
-
Your Codes
-
Reffers
-
Linked Codes
|
Code:
Short link for Twitter:
HTML:
HTML view:
Copy Source | Copy HTML- #include <vector>
-
- // Exp. 1
- // #define PRE_SIZE 0
-
- // Exp. 2
- // #define PRE_SIZE 32
- int main(){
- for(int i=0; i<10000000; ++i){
- std::vector<int> v;
- v.reserve(PRE_SIZE);
- for(int k=0; k<50; ++k)
- v.push_back(k);
- }
- return 0;
- }
|