Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 4d774f343a6faedc6a330fc6097eec797058d873 1 parent eb877f3
José Valim authored January 21, 2014 psyeugenic committed January 28, 2014

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  eeps/eep-0043.md
6  eeps/eep-0043.md
Source Rendered
@@ -461,8 +461,9 @@ Richard O'Keefes frames proposal.
461 461
   Syntax equivalence: *none*.
462 462
   
463 463
   The function returns the number of key-value pairs in the map.
  464
+  This operation happens in constant time.
464 465
   
465  
-  Same as, `maps:size(M)` and `length(maps:to_list(M))`.
  466
+  Same as `maps:size(M)`.
466 467
   
467 468
 ### maps module ###
468 469
 
@@ -553,8 +554,9 @@ Richard O'Keefes frames proposal.
553 554
   Syntax equivalence: *none*.
554 555
 
555 556
   The function returns the number of key-value associations in the map.
  557
+  This operation happens in constant time.
556 558
 
557  
-  Same as, `erlang:map_size(M)` and `length(maps:to_list(M))`.
  559
+  Same as `erlang:map_size(M)`.
558 560
 
559 561
 ##### `maps:put(K :: term(), V :: term(), M0 :: map()) -> M1 :: map().`
560 562
 

0 notes on commit 4d774f3

Please sign in to comment.
Something went wrong with that request. Please try again.