Hi.
The TMap is a tree not balanced. If the keys entered not arent distributed randomly the eficiency is very poor. The tree is degenerated
Test it introducing previos ordered keys in TMap. The time of consulting, removing or inserting is very very very increased. The eficiency is O(n).
The TMapRN use same implementation used in java Treemap. This is a tree black-red. It is balanced.
It is indiferent if the keys are ordered previous. The time of consulting, inserting, removing, etc is O(Log(n))
The value of n is the number of keys inserteds
Whith 20000 keys previosly ordered the time of inserting in TMap is 35 seconds. In TMapRN is 200 milliseconds in my machine.
Bye,
Ramon
The TMap is a tree not balanced. If the keys entered not arent distributed randomly the eficiency is very poor. The tree is degenerated
Test it introducing previos ordered keys in TMap. The time of consulting, removing or inserting is very very very increased. The eficiency is O(n).
The TMapRN use same implementation used in java Treemap. This is a tree black-red. It is balanced.
It is indiferent if the keys are ordered previous. The time of consulting, inserting, removing, etc is O(Log(n))
The value of n is the number of keys inserteds
Whith 20000 keys previosly ordered the time of inserting in TMap is 35 seconds. In TMapRN is 200 milliseconds in my machine.
Bye,
Ramon