zendframework/zf2 — pull request #2924 by marc-mabe (2012-11-09 11:49:26+00:00)
Title: small speed-up of Zend\EventManager\EventManager::triggerListeners()

This small changes speeds up the calls of `triggerListeners` 20% (~0.20s before and ~0.16s after)

- call `insertListeners` only if the listeners to insert are not empty (already checked above)
- don't check emptiness to not ran into a loop - the loop itself checks emptiness

my bench: https://gist.github.com/4045274