In both of the spindumps, all the time is being spent in malloc/free, which is used by sregex when handling lookahead assertions. My hunch is that something is happening on your system that is making malloc much slower than usual. Perhaps you have one of the environment variables turned on that enables malloc debugging on OSX?
In any case, I’ll reduce the number of malloc/free calls in this path for the next build. It’ll give a small speedup in the general case, but may give a significant speedup for you.