mpetazzoni/ttorrent — pull request #76 by shevek (2013-12-25 22:46:48+00:00)
Title: Torrent: 25% performance improvement in hashing.

Not fully checked for correctness, but there's a lot of stuff in here which might help:

a) Treat the byte array as a byte array throughout.
b) Don't block up all the processor threads every time we have 4 futures: Longer queues both sides of the handoff.
c) Don't copy data between ByteBuffers owned by different threads.
d) Avoid unnecessary MessageDigest.reset()
e) Use awaitTermination() and more powerful ThreadPoolExecutor methods.