projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d44291
)
Preallocate edge node vectors. ~1% faster.
author
Nico Weber
<nicolasweber@gmx.de>
Sat, 21 Mar 2015 04:21:14 +0000
(21:21 -0700)
committer
Nico Weber
<nicolasweber@gmx.de>
Sat, 21 Mar 2015 15:17:02 +0000
(08:17 -0700)
src/manifest_parser.cc
patch
|
blob
|
history
diff --git
a/src/manifest_parser.cc
b/src/manifest_parser.cc
index
4e639d1
..
b747ad4
100644
(file)
--- a/
src/manifest_parser.cc
+++ b/
src/manifest_parser.cc
@@
-321,6
+321,7
@@
bool ManifestParser::ParseEdge(string* err) {
edge->pool_ = pool;
}
+ edge->outputs_.reserve(outs.size());
for (vector<EvalString>::iterator i = outs.begin(); i != outs.end(); ++i) {
string path = i->Evaluate(env);
string path_err;
@@
-337,6
+338,7
@@
bool ManifestParser::ParseEdge(string* err) {
return true;
}
+ edge->inputs_.reserve(ins.size());
for (vector<EvalString>::iterator i = ins.begin(); i != ins.end(); ++i) {
string path = i->Evaluate(env);
string path_err;