[jboss-jira] [JBoss JIRA] (JGRP-2481) Use IdentityHashmap in Util.TYPES and ClassConfigurator

Bela Ban (Jira) issues at jboss.org
Wed Jun 3 11:16:02 EDT 2020


    [ https://issues.redhat.com/browse/JGRP-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133980#comment-14133980 ] 

Bela Ban commented on JGRP-2481:
--------------------------------

Created new class {{IntHashMap}} which uses ints/shorts/longs etc as keys (and indices), and an array for the values.

> Use IdentityHashmap in Util.TYPES and ClassConfigurator
> -------------------------------------------------------
>
>                 Key: JGRP-2481
>                 URL: https://issues.redhat.com/browse/JGRP-2481
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 5.0.0.Beta2
>
>
> When we have lookup hashmaps, populated at startup, and not changed afterwards, we can use IdentityHashmaps, as a {{get()}} is constant.
> For keys with a contiguous range (e.g. {{[1 .. 20]}}), we might even use a simple array of keys and values, e.g. {{[K1,V1,K2,V2, ... Kn,Vn}}.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list