Revision: 21545
Author: [email protected]
Date: Wed May 28 08:06:14 2014 UTC
Log: Reuse ZoneList memory if possible.
Clear() is rather wasteful for ZoneLists, because it discards
all previously allocated memory, making it impossible to reuse
until the whole Zone is released. Better use Rewind(0) in this
case, which just resets the length to zero.
[email protected]
Review URL: https://codereview.chromium.org/302783007
http://code.google.com/p/v8/source/detail?r=21545
Modified:
/branches/bleeding_edge/src/hydrogen-escape-analysis.cc
/branches/bleeding_edge/src/hydrogen.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Tue May 20
13:03:25 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Wed May 28
08:06:14 2014 UTC
@@ -299,7 +299,7 @@
int size_in_bytes = allocate->size()->GetInteger32Constant();
number_of_values_ = size_in_bytes / kPointerSize;
number_of_objects_++;
- block_states_.Clear();
+ block_states_.Rewind(0);
// Perform actual analysis step.
AnalyzeDataFlow(allocate);
@@ -320,7 +320,7 @@
CollectCapturedValues();
if (captured_.is_empty()) break;
PerformScalarReplacement();
- captured_.Clear();
+ captured_.Rewind(0);
}
}
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Tue May 27 09:40:04 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Wed May 28 08:06:14 2014 UTC
@@ -10515,7 +10515,7 @@
DeclareGlobalsNativeFlag::encode(current_info()->is_native()) |
DeclareGlobalsStrictMode::encode(current_info()->strict_mode());
Add<HDeclareGlobals>(array, flags);
- globals_.Clear();
+ globals_.Rewind(0);
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.