Ex7.3 feedback: missed conclusion
This commit is contained in:
parent
599b73b216
commit
f0ec419a8a
5 changed files with 13 additions and 2 deletions
3
ex7.3/conclusion.txt
Normal file
3
ex7.3/conclusion.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
The timing is much longer for vectors than for a list.
|
||||||
|
|
||||||
|
However, I also get a segfault for the vector program.
|
4
ex7.3/list.time
Normal file
4
ex7.3/list.time
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
real 0m0.028s
|
||||||
|
user 0m0.021s
|
||||||
|
sys 0m0.004s
|
|
@ -4,7 +4,7 @@ int main() {
|
||||||
std::list<int> l;
|
std::list<int> l;
|
||||||
|
|
||||||
// Fill List
|
// Fill List
|
||||||
for (int i = 0; i < 10000000 ; i++) {
|
for (int i = 0; i < 10000 ; i++) {
|
||||||
l.push_back(i);
|
l.push_back(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,5 +13,4 @@ int main() {
|
||||||
iter = l.erase( iter );
|
iter = l.erase( iter );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
5
ex7.3/vector.time
Normal file
5
ex7.3/vector.time
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Segmentation fault (core dumped)
|
||||||
|
|
||||||
|
real 0m0.927s
|
||||||
|
user 0m0.349s
|
||||||
|
sys 0m0.007s
|
Reference in a new issue