From f677ebfd832c9c614fea5e6735725fec2f7a3f2a Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Fri, 29 May 2015 16:29:43 +0100 Subject: Cache stack map encoding Operations on CodeInfo and StackMap objects repeatedly read encoding information from the MemoryRegion. Since these are 3-bit-loads of values that never change, caching them can measurably reduce compile times. According to benchmarks, this patch saves 1-3% on armv7, 2-4% on x86, and 0-1% on x64. Change-Id: I46b197513601325d8bab562cc80100c00ec28a3b --- compiler/optimizing/stack_map_stream.h | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/optimizing/stack_map_stream.h') diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index 0af983b1bf..274d573350 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -171,6 +171,7 @@ class StackMapStream : public ValueObject { StackMapEntry current_entry_; InlineInfoEntry current_inline_info_; + StackMapEncoding stack_map_encoding_; size_t stack_mask_size_; size_t inline_info_size_; size_t dex_register_maps_size_; -- cgit v1.2.3-59-g8ed1b