Use direct loop when filling small arrays.
authorantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 May 2010 14:14:34 +0000 (14:14 +0000)
committerantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 May 2010 14:14:34 +0000 (14:14 +0000)
commitc7b2af37ba37b5eb7bc22b44bc534e05cc19faf6
tree58c0bd78930638a02f4330bf0d7d1bbed6a06b2f
parenta31c578f25fb607cb17651a8b63d6ca536a982db
Use direct loop when filling small arrays.

r3995 (http://code.google.com/p/v8/source/detail?r=3995) introduce performance
regression for the case when arrat size is small (think new Array(4)).

It turns out that in those cases rep stos is slower than plain loop (apprently
due to ecx increment, but I didn't check this hypothesis.)  The next thing
to try could be direct jump into right place of long sequence of stos'es.

Review URL: http://codereview.chromium.org/2082006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ia32/assembler-ia32.cc
src/ia32/assembler-ia32.h
src/ia32/builtins-ia32.cc
src/ia32/disasm-ia32.cc
test/cctest/test-disasm-ia32.cc