From charlesreid1

No edit summary
No edit summary
Line 4: Line 4:


According to OpenJDK source code, TreeMap should take O(log N) time. So, the TreeMap only LOOKS like it is O(1). Have to get to really large TreeMaps to get actual O(N) performance, I guess.
According to OpenJDK source code, TreeMap should take O(log N) time. So, the TreeMap only LOOKS like it is O(1). Have to get to really large TreeMaps to get actual O(N) performance, I guess.
https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/util/TreeMap.java


=Flags=
=Flags=

Revision as of 00:34, 28 June 2017

Notes

Link on git.charlesreid1.com: https://charlesreid1.com:3000/cs/java/src/master/hash/timing/TimingMap.java

According to OpenJDK source code, TreeMap should take O(log N) time. So, the TreeMap only LOOKS like it is O(1). Have to get to really large TreeMaps to get actual O(N) performance, I guess.

https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/util/TreeMap.java

Flags