twitter/hpack — pull request #14 by adriancole (2014-05-13 16:20:10+00:00)
Title: Don't double-copy array when huffman decoding.

BAOS.toArray makes a defensive copy of its internal byte array buffer. If we don't do that, we can avoid a guaranteed extra array copy when huffman decoding. I profiled this change using hpack examples, and it increased the operations per second significantly enough to warrant the awkwardness of using byte arrays (IMHO).

Before
```
Benchmark Mode Samples Mean Mean error Units
decodeHuffmanExamples thrpt 50 938.633 11.216 ops/ms
```

After
```
Benchmark Mode Samples Mean Mean error Units
decodeHuffmanExamples thrpt 50 1102.408 22.488 ops/ms
```