[
https://issues.apache.org/jira/browse/PROTON-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16690700#comment-16690700
]
ASF GitHub Bot commented on PROTON-1965:
----------------------------------------
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
----
> Optimize CompositeReadableBuffer::equals with single chunk
> ----------------------------------------------------------
>
> Key: PROTON-1965
> URL: https://issues.apache.org/jira/browse/PROTON-1965
> Project: Qpid Proton
> Issue Type: Improvement
> Affects Versions: proton-j-0.30.0
> Reporter: Francesco Nigro
> Priority: Minor
>
> CompositeReadableBuffer::equals with single chunk could be optimized in order
> to
> access directly the single array chunk to speed up memory accesses.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]