mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Use optimization instead of optimisation
This commit is contained in:
parent
0c3bb35d66
commit
07568df92b
1 changed files with 2 additions and 2 deletions
|
@ -151,7 +151,7 @@ capacity = \@Dict { dataIndices } ->
|
|||
cap - Num.shiftRightZfBy cap 3
|
||||
|
||||
## Return a dictionary with space allocated for a number of entries. This
|
||||
## may provide a performance optimisation if you know how many entries will be
|
||||
## may provide a performance optimization if you know how many entries will be
|
||||
## inserted.
|
||||
withCapacity : Nat -> Dict k v | k has Hash & Eq
|
||||
withCapacity = \_ ->
|
||||
|
@ -412,7 +412,7 @@ remove = \@Dict { metadata, dataIndices, data, size }, key ->
|
|||
@Dict { metadata, dataIndices, data, size }
|
||||
|
||||
## Insert or remove a value for a specified key. This function enables a
|
||||
## performance optimisation for the use case of providing a default when a value
|
||||
## performance optimization for the use case of providing a default when a value
|
||||
## is missing. This is more efficient than doing both a `Dict.get` and then a
|
||||
## `Dict.insert` call, and supports being piped.
|
||||
## ```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue