You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/12/01 06:12:26 UTC

[GitHub] [activemq-artemis] franz1981 edited a comment on pull request #3363: ARTEMIS-3016 Reduce DuplicateIDCache memory footprint

franz1981 edited a comment on pull request #3363:
URL: https://github.com/apache/activemq-artemis/pull/3363#issuecomment-736245035


   The new hash code implementation should help in other places as well, but probably will send a new PR to address it, FYI
   ```
   Benchmark                                      (length)  (logPermutations)  (seed)  (unsafe)  Mode  Cnt   Score   Error  Units
   ByteArrayHashCodeBenchamark.arraysHashCode            7                  4       0      true  avgt   16  10.790 ± 0.089  ns/op
   ByteArrayHashCodeBenchamark.arraysHashCode            7                 10       0      true  avgt   16  11.155 ± 0.284  ns/op
   ByteArrayHashCodeBenchamark.arraysHashCode            8                  4       0      true  avgt   16  11.501 ± 0.037  ns/op
   ByteArrayHashCodeBenchamark.arraysHashCode            8                 10       0      true  avgt   16  11.901 ± 0.380  ns/op
   ByteArrayHashCodeBenchamark.arraysHashCode           36                  4       0      true  avgt   16  37.772 ± 0.202  ns/op
   ByteArrayHashCodeBenchamark.arraysHashCode           36                 10       0      true  avgt   16  38.580 ± 1.283  ns/op
   ByteArrayHashCodeBenchamark.artemisHashCode           7                  4       0      true  avgt   16   8.337 ± 0.088  ns/op
   ByteArrayHashCodeBenchamark.artemisHashCode           7                 10       0      true  avgt   16   8.393 ± 0.056  ns/op
   ByteArrayHashCodeBenchamark.artemisHashCode           8                  4       0      true  avgt   16   7.066 ± 0.022  ns/op
   ByteArrayHashCodeBenchamark.artemisHashCode           8                 10       0      true  avgt   16   7.151 ± 0.096  ns/op
   ByteArrayHashCodeBenchamark.artemisHashCode          36                  4       0      true  avgt   16  13.721 ± 0.842  ns/op
   ByteArrayHashCodeBenchamark.artemisHashCode          36                 10       0      true  avgt   16  13.437 ± 0.078  ns/op
   ```
   The 8 bytes case is in case duplicate ids are 64 bit sequence ids while the 36 bytes case in case of a random UUID,
   It's a lot more faster then the OOTB version of `Arrays::hashCode` (on JDK 8).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org