Commit Graph

23 Commits

Author SHA1 Message Date
Vincent Batts 499faa7234 stream: write error to stderr instead 2015-08-16 19:12:32 -04:00
Vincent Batts a03956b35e stream_test: remove buffer use 2015-08-16 19:02:13 -04:00
Vincent Batts fa4337c370 stream: reduce allocs in Reset()
improvement:
```
benchmark               old ns/op     new ns/op     delta
BenchmarkHash8Bytes     21137         12201         -42.28%
BenchmarkHash1K         27235         14842         -45.50%
BenchmarkHash8K         38630         29034         -24.84%

benchmark               old MB/s     new MB/s     speedup
BenchmarkHash8Bytes     0.38         0.66         1.74x
BenchmarkHash1K         37.60        68.99        1.83x
BenchmarkHash8K         212.06       282.15       1.33x

benchmark               old allocs     new allocs     delta
BenchmarkHash8Bytes     10             9              -10.00%
BenchmarkHash1K         10             9              -10.00%
BenchmarkHash8K         9              8              -11.11%

benchmark               old bytes     new bytes     delta
BenchmarkHash8Bytes     16712         8520          -49.02%
BenchmarkHash1K         17728         9536          -46.21%
BenchmarkHash8K         16704         8512          -49.04%
```
2015-08-16 18:59:09 -04:00
Vincent Batts c5700a9f0d stream_test: shave 2sec off tests 2015-08-16 18:42:40 -04:00
Vincent Batts 08e311195d stream: adding a benchmark
Based on stdlib's `sha256`. Initial output:
BenchmarkHash8Bytes       100000             20387 ns/op           0.39 MB/s
BenchmarkHash1K    50000             25876 ns/op          39.57 MB/s
BenchmarkHash8K    50000             38836 ns/op         210.94 MB/s
2015-08-16 14:49:58 -04:00
Vincent Batts 71d35fdc80 stream: add a test for large chunks
checking 512*1024 byte chunks

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-04-09 14:37:39 -04:00
Vincent Batts 6b706eb39f stream: fix for large chunks
io.Copy() uses a 32*1024 byte chunk size. When a blocksize larger than
this was used, the copy was out of bounds.

https://gist.github.com/philips/b90ed91068930fe85bed

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-04-09 14:12:48 -04:00
Vincent Batts bedd7a10ff stream: tests and fix for Reset() 2015-03-31 10:55:25 -04:00
Vincent Batts 5277ffd66c .: add travis info 2015-03-30 15:32:35 -04:00
Vincent Batts 8af58a1af9 README.md: whats next 2015-03-30 15:30:38 -04:00
Vincent Batts 3f104b4e6a .: a bit of presentation and legal 2015-03-30 15:25:38 -04:00
Vincent Batts 558c5d610d .: golint 2015-03-30 15:20:50 -04:00
Vincent Batts 3cc77c8073 stream: give access to tree aspects 2015-03-30 15:19:46 -04:00
Vincent Batts 1959058d6a stream.go: Finishing up Sum() 2015-03-30 15:02:53 -04:00
Vincent Batts 257ed6dfad stream: Write() is mostly finished 2015-03-26 18:48:33 -04:00
Vincent Batts 68f4bcde5d stream: first chunk made into a node 2015-03-26 16:46:02 -04:00
Vincent Batts fd362c6aa5 progress on a streaming interface 2015-03-25 17:28:17 -04:00
Vincent Batts 949cec0dce stream.go: starting an interfacing for streaming sums 2015-03-19 17:47:43 -04:00
Vincent Batts 38913c9117 .: drawing some from bittorrent 2015-03-19 17:20:51 -04:00
Vincent Batts a00f78e2e9 doc.go: another req 2015-03-17 17:34:09 -04:00
Vincent Batts 4ac1701698 doc.go: starting a requirements outline 2015-03-17 17:30:41 -04:00
Vincent Batts da81f82e13 .: checksum for an unbalanced tree 2015-03-17 17:27:39 -04:00
Vincent Batts 205a82f081 .: stub on merkle nodes 2015-03-17 16:45:01 -04:00