mdurrant/php-binary-reader — pull request #7 by jwpage (2014-08-28 04:28:12+00:00)
Title: Speed Optimisations

This PR introduces a bunch of optimisations that significantly increases the performance of the BinaryReader.

Here's an example script that reads all the bytes out of a random 100kB string.
https://gist.github.com/jwpage/d722b9c830788f38071c
Here's the output of XHProf comparing a run of that script on the master branch, and then on the new branch (on PHP 5.5):
https://cloud.githubusercontent.com/assets/52687/4071042/fcccbfae-2e68-11e4-8d67-eded285d8b7d.png

Normally I'd be against micro-optimisations like this, but when dealing with reading bytes from large files they really add up.

And again: no breaking changes, 100% code coverage and PSR-2.