meteficha/crypto-conduit — pull request #7 by snoyberg (2012-04-15 06:50:54+00:00)
Title: More efficient sinkHash, sinkHmac, and sinkCbcMac

This speeds things up dramatically by avoiding unnecessary monadic binds and skipping a `Conduit` fuse. Relevant benchmarks below. I would like to apply this fix to `blockCipherConduit` as well, but I'm still running into a test failure. I'll likely include another commit in the next few hours.

```
benchmarking sinkHash
mean: 1.424815 ms, lb 1.419174 ms, ub 1.432631 ms, ci 0.950
std dev: 33.71627 us, lb 24.59794 us, ub 51.74532 us, ci 0.950
found 4 outliers among 100 samples (4.0%)
2 (2.0%) low mild
2 (2.0%) high severe
variance introduced by outliers: 17.096%
variance is moderately inflated by outliers

benchmarking sinkHash_new
mean: 284.7827 ns, lb 283.1964 ns, ub 286.4163 ns, ci 0.950
std dev: 8.266729 ns, lb 7.228769 ns, ub 9.973731 ns, ci 0.950
found 2 outliers among 100 samples (2.0%)
variance introduced by outliers: 23.841%
variance is moderately inflated by outliers

benchmarking sinkHmac
mean: 1.374745 ms, lb 1.372614 ms, ub 1.377081 ms, ci 0.950
std dev: 11.41087 us, lb 9.853213 us, ub 13.33309 us, ci 0.950

benchmarking sinkHmac_new
mean: 288.7355 ns, lb 285.7900 ns, ub 298.3777 ns, ci 0.950
std dev: 24.63197 ns, lb 8.809601 ns, ub 55.33999 ns, ci 0.950
found 2 outliers among 100 samples (2.0%)
1 (1.0%) high severe
variance introduced by outliers: 73.792%
variance is severely inflated by outliers
```