I've replaced near all if [[ ]] calls with [[ ]] in zsh-syntax-highlighting's main-highlighter.zsh, and no performance was gained. So unless there's a tight loop, if [[ doesn't slow down when compared to [[ alone. BTW. Running attached parse.zsh on toparse.zsh with zsh-5.2 in shebang produces following difference in generated region_highlight, to /bin/zsh (OS X 5.0.8): 439c439 < 3878 3885 fg=yellow --- > 3878 3885 fg=green The same difference for 5.1.1, 5.1. Zsh-5.0.8-dev-0 doesn't produce the difference, and 5.0.8-dev-1 produces it, so apparently that's where the difference starts appearing, compared to OS X 5.0.8 /bin/zsh. Best regards, Sebastian Gniazdowski