map data structure specializing keys to ints, redux

Miguel Garcia Gutierrez miguel.m.garcia at oracle.com
Fri Apr 18 09:44:56 UTC 2014


I'm looking for a map data structure specializing keys to ints (context below).

What are the pros and cons of:
  (1) http://lafo.ssw.uni-linz.ac.at/javadoc/graalvm/all/com/oracle/graal/graph/NodeMap.html
  (2) http://www.goldmansachs.com/gs-collections/javadoc/5.0.0/com/gs/collections/impl/map/mutable/primitive/IntObjectHashMap.html
  (3) other int-to-object map implementation you'd like to bring up

Regarding (2), the documentation mentions it relies on open addressing and quadratic probing.
  
This question is a follow-up to another question I made:
  http://mail.openjdk.java.net/pipermail/graal-dev/2014-March/001774.html

Background, to recap:
  Frequently one needs to map Nodes to something, where:
  - the lifetime of such maps is limited to a single phase [1], and
  - no field is accessed on the keys,
  thus Node ids (which are ints) could be used as keys rather than Nodes themselves.


Miguel


More information about the graal-dev mailing list