summaryrefslogtreecommitdiffstats
path: root/vm/compiler/Compiler.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-01-12 15:26:36 -0800
committerElliott Hughes <enh@google.com>2010-01-12 15:26:36 -0800
commitd028bd15d5c5dfe2b4cbc66e7c4d6d4c716795de (patch)
tree16b8977c29bfb0555673f3e2b2bbcb5babc76b00 /vm/compiler/Compiler.h
parent083b87cd4fbc8958dcefac2925ca9dc5c3a47010 (diff)
downloadandroid_dalvik-d028bd15d5c5dfe2b4cbc66e7c4d6d4c716795de.tar.gz
android_dalvik-d028bd15d5c5dfe2b4cbc66e7c4d6d4c716795de.tar.bz2
android_dalvik-d028bd15d5c5dfe2b4cbc66e7c4d6d4c716795de.zip
Make Formatter %d cost about the same as %s (i.e. 60% faster).
Fast-path "%d" and "%s", the only two cases that matter, so they don't have to go through all the flags, width, and precision machinery unless flags, widths, or precisions are actually specified. This makes "%s" slightly but not significantly faster -- because I'd already optimized that code for the default case pretty well -- but makes a huge difference to "%d", which wasn't as amenable to general optimization. I've also improved the identifiers and comments surrounding the date suffix, after TraceView misled me into attempting to optimize this non-hotspot (though to be fair, I'm only benchmarking on passion-eng with JIT; TraceView might be telling the truth for a G1 without JIT). TraceView also misled me into trying to optimize away the check for uppercase conversion types at the end of Transformer.transform (by adding different bodies to the uppercase entries in the switch directly above it), but that made no convincing difference on passion-eng. Bug: 2272346
Diffstat (limited to 'vm/compiler/Compiler.h')
0 files changed, 0 insertions, 0 deletions