Permalink
Browse files

Note maps:size/1 happens in constant time

We have removed the comparisons with `length(maps:to_list(Map))`
to avoid confusion regarding the time-complexity of the size
operation.
  • Loading branch information...
1 parent eb877f3 commit 4d774f343a6faedc6a330fc6097eec797058d873 @josevalim josevalim committed with psyeugenic Jan 21, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 eeps/eep-0043.md
View
@@ -461,8 +461,9 @@ Richard O'Keefes frames proposal.
Syntax equivalence: *none*.
The function returns the number of key-value pairs in the map.
+ This operation happens in constant time.
- Same as, `maps:size(M)` and `length(maps:to_list(M))`.
+ Same as `maps:size(M)`.
### maps module ###
@@ -553,8 +554,9 @@ Richard O'Keefes frames proposal.
Syntax equivalence: *none*.
The function returns the number of key-value associations in the map.
+ This operation happens in constant time.
- Same as, `erlang:map_size(M)` and `length(maps:to_list(M))`.
+ Same as `erlang:map_size(M)`.
##### `maps:put(K :: term(), V :: term(), M0 :: map()) -> M1 :: map().`

0 comments on commit 4d774f3

Please sign in to comment.