GitHub user franz1981 opened a pull request: https://github.com/apache/qpid-proton-j/pull/20
PROTON-1965 Optimize CompositeReadableBuffer::equals with single chunk Using the single chunk directly while performing the byte comparison increase the performance. Master: ``` Benchmark (chunks) (direct) (size) Mode Cnt Score Error Units CompositeReadableBufferBenchmark.equalsToByteBufferReader 1 false 8 avgt 5 18.127 ± 1.568 ns/op CompositeReadableBufferBenchmark.equalsToByteBufferReader 1 false 64 avgt 5 40.725 ± 2.329 ns/op CompositeReadableBufferBenchmark.equalsToByteBufferReader 1 false 1024 avgt 5 460.801 ± 13.786 ns/op ``` This PR: ``` Benchmark (chunks) (direct) (size) Mode Cnt Score Error Units CompositeReadableBufferBenchmark.equalsToByteBufferReader 1 false 8 avgt 5 27.799 ± 0.462 ns/op CompositeReadableBufferBenchmark.equalsToByteBufferReader 1 false 64 avgt 5 108.563 ± 1.236 ns/op CompositeReadableBufferBenchmark.equalsToByteBufferReader 1 false 1024 avgt 5 5251.102 ± 261.561 ns/op ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/franz1981/qpid-proton-j PROTON-1965 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/qpid-proton-j/pull/20.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #20 ---- commit d4932b415fa73ff3378ca19af46c51fcf15d84de Author: Francesco Nigro <nigro.fra@...> Date: 2018-11-17T18:59:12Z PROTON-1965 Optimize CompositeReadableBuffer::equals with single chunk ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org