You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the culprit is here. (counted? (keys {:a 1})) returns false, so this is actually a lie :)
I think you cannot provide a default implementation and should instead force the users to define count themselves.
Right now defining count myself within def-map-type solves the performance issue.
The text was updated successfully, but these errors were encountered:
xificurC
changed the title
a map defined with def-map-type says it can be counted in constant time but in fact it can't
def-map-type's predefined count doesn't run in constant time
Aug 7, 2019
I think the culprit is here.
(counted? (keys {:a 1}))
returnsfalse
, so this is actually a lie :)I think you cannot provide a default implementation and should instead force the users to define
count
themselves.Right now defining
count
myself withindef-map-type
solves the performance issue.The text was updated successfully, but these errors were encountered: