public class HTreeVersusHashMapDemo extends Object
HTree
performance against a Java collections class such as HashMap
or
LinkedHashMap
. This demonstration is focused on the performance curve
when inserting a large number of keys into a collection. The Java collection
classes are faster for small numbers of keys, but the HTree
rapidly
out performs them as the #of keys grows larger.
The HTree
is run against the MemoryManager
. This means that
the data for the HTree
is mostly stored on the Java native process
heap using ByteBuffer.allocateDirect(int)
. Thus even a very
large HTree
instance can be run with a very small JVM object heap and
creates nearly no GC pressure.
The HTree
permits multiple entries for the same key. While variable
length keys are supported, the key for the HTree
is typically a 32
(or 64) bit hash code for the value stored in the HTree
. Normally,
the application will lookup all tuples having the same hash code and then
enforce Set
or Map
semantics by scanning those tuples for the
presence of the same application object.
Constructor and Description |
---|
HTreeVersusHashMapDemo() |
public static void main(String[] args)
args
- Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.