Hashmaps vs storing data in the tree
Fragment of a discussion from User talk:AW/kD-Tree
Jump to navigation
Jump to search
What I mean is that it seems slower to store the data with the point in a KDTree than it does to store the point in the tree and then use the point as the key for the hashmap. So for example you would have:
PointEntry entry = new PointEntry(pointCoordinates, DataObject); tree.add(entry);
instead of
hashmap.add(pointCoordinates, DataObject); tree.add(pointCoordinates);
Maybe I have some typecasting in the tree that is slowing it down?
AW