Nicholas Clark <nick@ccl4.org> writes: >If one uses Duff's device in PERL_HASH, the regression tests go about 2% >faster. Note - that may be literally true, but is not the speed difference in perl. The tests are riddled with sleep()s and other system timing overhead. > >Without: > >All tests successful. >u=1.33 s=0.46 cu=62.27 cs=10.54 scripts=273 tests=21120 > >real 2m16.388s >user 1m3.610s >sys 0m11.000s > >With: > >All tests successful. >u=1.4 s=0.32 cu=59.86 cs=10.71 scripts=273 tests=21120 > >real 2m11.748s >user 1m1.260s >sys 0m11.030s > > >perl gets about .25% bigger: > >-rwxrwxr-x 1 nick 1001 785667 Jan 20 15:36 bleadperl/perl >-rwxrwxr-x 1 nick 1001 787683 Jan 23 11:51 bleadperl-duff/perl > >[both 8462, same everything except -DHASH_DUFF in the latter] > > >I've not experimented with unrolling to 4 or 16. Would be interesting to see what inline costs in speed/size. Can you experiment with putting the "snazzy" hash in a _real_ function (in pp_hot.c or perhaps hv.c) and making PERL_HASH call that? -- Nick Ing-Simmons <nik@tiuk.ti.com> Via, but not speaking for: Texas Instruments Ltd.Thread Previous | Thread Next