summaryrefslogtreecommitdiff
path: root/compiler/dex/growable_array.h
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2013-09-05 17:13:19 -0700
committer buzbee <buzbee@google.com> 2013-09-06 15:55:51 -0700
commit56c717860df2d71d66fb77aa77f29dd346e559d3 (patch)
tree672cc501b98791939cab65b7b47329e90b73c005 /compiler/dex/growable_array.h
parentc7cd72c5ad65589b68e6aea185200fc2dbb0e850 (diff)
Compile-time tuning
Specialized the dataflow iterators and did a few other minor tweaks. Showing ~5% compile-time improvement in a single-threaded environment; less in multi-threaded (presumably because we're blocked by something else). Change-Id: I2e2ed58d881414b9fc97e04cd0623e188259afd2
Diffstat (limited to 'compiler/dex/growable_array.h')
-rw-r--r--compiler/dex/growable_array.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/dex/growable_array.h b/compiler/dex/growable_array.h
index 8e2abfbaf1..9053285af0 100644
--- a/compiler/dex/growable_array.h
+++ b/compiler/dex/growable_array.h
@@ -150,6 +150,11 @@ class GrowableArray {
size_t Size() const { return num_used_; }
+ void SetSize(size_t new_size) {
+ Resize(new_size);
+ num_used_ = new_size;
+ }
+
T* GetRawStorage() const { return elem_list_; }
static void* operator new(size_t size, ArenaAllocator* arena) {