Commit e0cbbd2d authored by titzer@chromium.org's avatar titzer@chromium.org

[turbofan] Allocate a small amount of slack space to graph builder environments.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/709463003

Cr-Commit-Position: refs/heads/master@{#25200}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6f18c1aa
......@@ -125,7 +125,11 @@ StructuredGraphBuilder::Environment::Environment(const Environment& copy)
: builder_(copy.builder()),
control_dependency_(copy.control_dependency_),
effect_dependency_(copy.effect_dependency_),
values_(copy.values_) {}
values_(copy.zone()) {
const size_t kStackEstimate = 7; // optimum from experimentation!
values_.reserve(copy.values_.size() + kStackEstimate);
values_.insert(values_.begin(), copy.values_.begin(), copy.values_.end());
}
void StructuredGraphBuilder::Environment::Merge(Environment* other) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment