I attach my results for the same builds as yours. Tried to calibrate the running time and I ended up running really long tests (quite exhausting to move mouse every few minutes as my screensaver is broken and always turns on after few minutes). Will try to calibrate again later, and I also am running the same tests on a ubuntu netbook. Few conclusions: > Running [zsh-5.0.7]: string_test 48631,87 > Running [zsh-5.0.8]: string_test 86302,14 This says there something happened after 5.0.7 and reveals itself on OS X, could try to track it with bisect. > Running [zsh-5.1]: string_test 86698,42 > Running [zsh-head-8e9a68a]: string_test 38887,54 > Running [zsh-36926]: string_test 86497,62 This says 36926 doesn't include string boost up (at cost of memory use) that current head has. > Running [zsh-5.1]: search_test 51321,70 > Running [zsh-head-8e9a68a]: search_test 10071,26 > Running [zsh-36926]: search_test 10260,60 This says that pattern maching boost up is retained. > Running [zsh-5.1]: function_test 49070,83 > Running [zsh-head-8e9a68a]: function_test 56299,14 > Running [zsh-36926]: function_test 54456,34 This informs about slowdown caused by newheaps patch, and points that 36926 can make it smaller. I also did memory tests: > # Tests for zsh-head-8e9a68a > # string_test 42, 182, 318, 457, 590, 720, last: 10 > string_test 317.8 This informs about the 36834 problem with memory. > # Tests for zsh-36926 > # string_test 2.1, 6.6, 8.6, 10, 10, 11, 9.5, 11, 11, 11, 11, 11, last: 9.6 > string_test 9.3 This shows it's solved. > # search_test 110, 215, last: 265 > search_test 110.0 This is the high memory usage when matching patterns in large arrays you mentioned. Best regards, Sebastian Gniazdowski