jacksontj / dataman

MIT License
9 stars 4 forks source link

Remove layer of channels #90

Closed jacksontj closed 6 years ago

jacksontj commented 6 years ago

This is a ~15-22% perf improvement, while reducing allocations 22-85%

benchmark                                 old ns/op     new ns/op     delta
BenchmarkResultStream-4                   397032        402902        +1.48%
BenchmarkResultStreamTransformation-4     416076        405804        -2.47%
BenchmarkMergeResultStreamsUnique-4       2823068       2368699       -16.09%
BenchmarkMergeResultStreams-4             2691385       2089058       -22.38%

benchmark                                 old allocs     new allocs     delta
BenchmarkResultStream-4                   10             10             +0.00%
BenchmarkResultStreamTransformation-4     11             11             +0.00%
BenchmarkMergeResultStreamsUnique-4       5438           4235           -22.12%
BenchmarkMergeResultStreams-4             1417           215            -84.83%

benchmark                                 old bytes     new bytes     delta
BenchmarkResultStream-4                   537           538           +0.19%
BenchmarkResultStreamTransformation-4     545           544           -0.18%
BenchmarkMergeResultStreamsUnique-4       922415        60417         -93.45%
BenchmarkMergeResultStreams-4             869288        7470          -99.14%