xetorthio/jedis — pull request #780 by rdifalco (2014-10-22 01:49:28+00:00)
Title: Minimize output stream allocations

Addresses issues #779 and #775. Added a Protocol stream benchmark and measured a 73% increase for Multi Bulk and 87% increase for Status Reply. The greatly reduces the number of temporary objects created and encoded for reading results. It also ensures that we will hear about it if a stream is not fully read. In the currently implementation a stream error could cause readByte to return -1 even though a byte is required by the protocol. All unit tests and benchmarks pass.