On Sat, Mar 4, 2017, at 04:00 PM, Bart Schaefer wrote: > Although the following might help in some cases -- (v->start < 0) can't > be true very often or arrlen() would have shown up nearly as much as > arrlen_le(), but maybe this shaves a few unnecessary recounts? > > Anyway changing from arrlen_le() to arrlen_gt() removes a couple of > tail calls, so this might get faster, and will also reveal how many > of those arrlen_le() are coming through here. Time is still the same, 25 s. The zrealloc-patch that was pushed helped, before: 37 s, after: the 25 s. Hashes are 17 s. Attached callgrind result from with-patch current-head run: 29,965,124,064 arrlen_le [/usr/local/bin/zsh-5.3.1-dev-0_O2_bopt] 29,965,124,049 arrlen_gt [/usr/local/bin/zsh-5.3.1-dev-0_O2_bopt] 6,700,764,538 itype_end [/usr/local/bin/zsh-5.3.1-dev-0_O2_bopt] 6,668,004,434 arrlen [/usr/local/bin/zsh-5.3.1-dev-0_O2_bopt] 4,552,766,774 _platform_memmove$VARIANT$Nehalem [/usr/lib/system/libsystem_platform.dylib] 2,677,827,871 stringsubst [/usr/local/bin/zsh-5.3.1-dev-0_O2_bopt] -- Sebastian Gniazdowski psprint3@fastmail.com