the implementation of the remove predicate in mapMSupport does not use the custom key comparison and its runtime is in O(n) (where -as usual- n denotes the number of elements in the collection):
Code: Select all
remove(T) :-
if T = site:getAll_nd() then
tuple(Key, _Value) = T,
site:removeKey(Key)
end if.
Code: Select all
remove(tuple(Key, _Value)) :-
site:removeKey(Key).
Code: Select all
contains(tuple(Key, Value)) :-
Value = site:tryGet(Key).
Regards
Martin