phpspec/phpspec — pull request #569 by ciaranmcnulty (2014-11-29 15:20:53+00:00)
Title: Refactor the way default Matchers are set to avoid re-sorting

Currently before *every* example, MatchersMaintainer adds all of the default matchers one at a time to the MatcherManager. The list of matchers inside MatcherManager is re-sorted every time a new one is added.

This adds a method to MatcherManager to uncritically take a pre-sorted list of Default matchers that can then be re-used between executions, and sorting only needs to be triggered when an inline matcher is encountered.

Blackfire.io shows >10% performance increase on the PhpSpec suite:
![comparison](https://cloud.githubusercontent.com/assets/237866/5234902/1c7a1d18-77db-11e4-921b-6462f12402c4.png)