[infinispan-issues] [JBoss JIRA] (ISPN-8422) Investigate removal of hashCode from memory block and rely solely on equals

William Burns (JIRA) issues at jboss.org
Wed Nov 8 16:30:00 EST 2017


    [ https://issues.jboss.org/browse/ISPN-8422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487797#comment-13487797 ] 

William Burns commented on ISPN-8422:
-------------------------------------

Another thing to mention is that currently we reuse the hashCode for the key WrappedByteArray. This does prevent a hash calculation for equality checks (although we could remove this and only rely on the bytes themselves). So while this could save bytes per entry we may be losing some read/write perf (although it would have to be tested).

> Investigate removal of hashCode from memory block and rely solely on equals
> ---------------------------------------------------------------------------
>
>                 Key: ISPN-8422
>                 URL: https://issues.jboss.org/browse/ISPN-8422
>             Project: Infinispan
>          Issue Type: Sub-task
>            Reporter: William Burns
>            Assignee: William Burns
>             Fix For: 9.2.0.Beta1
>
>
> We could remove the hashCode 4 bytes taking up space in the allocated memory block. Currently this is only used for eviction, maybe instead we could write a VInt that says which offset of locks to use. In majority of cases <= 64 cores this will result in saving 3 bytes per entry.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list