Specialize array iteration in GenArrayWaitHandle::create
commit3c777c570c2d587bcd553c5e5b73c83b6e10595e
authorJordan DeLong <jdelong@fb.com>
Sun, 17 Nov 2013 19:33:57 +0000 (17 11:33 -0800)
committerSara Golemon <sgolemon@fb.com>
Thu, 21 Nov 2013 06:07:48 +0000 (20 22:07 -0800)
tree5df8882c0148c61cc2de2b5bbabb1ea815fed2be
parentf1e7c8246304156e7b2f47b72f5f8e55f93cdddb
Specialize array iteration in GenArrayWaitHandle::create

Also, only do one pass over the array, instead of two.

Perflab things it cuts on instructions a very tiny bit, and cuts
branch misses (less than a percent.)  This is adding a place that
assumes packed and mixed arrays have the same value layout---do we
think it's worth that?  (We can always rip it out later, and maybe
GenArrayWaitHandle will become less important if people soon use
Map/Vector WaitHandle instead?)

Reviewed By: @jano

Differential Revision: D1061039
hphp/runtime/base/hphp-array-defs.h
hphp/runtime/base/hphp-array.h
hphp/runtime/ext/asio/gen_array_wait_handle.cpp
hphp/runtime/ext/ext_asio.h