mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Remove hashflooding comment
I think for now it is not worth considering adding hashflooding mitigation to the Roc Dict. 1. Wyhash is a secure enough has to pass SMHasher. 2. Languages like Go use wyhash in production and have not seen hashflooding issues. 3. We do have a random seed that Dicts use that changes per application linking. (Could monomorphize on Dict type for more randomness) 4. Any sort of fallback checks will lead to worse performance in the normal case. 5. A reasonable http server or app can limit the size of JSON or number of HTTP headers to accept.
This commit is contained in:
parent
28e4ae8ae5
commit
ba28ba7ca3
1 changed files with 0 additions and 3 deletions
|
@ -94,9 +94,6 @@ interface Dict
|
||||||
## It has a list of keys value pairs that is ordered based on insertion.
|
## It has a list of keys value pairs that is ordered based on insertion.
|
||||||
## It uses a list of indices into the data as the backing of a hash map.
|
## It uses a list of indices into the data as the backing of a hash map.
|
||||||
Dict k v := {
|
Dict k v := {
|
||||||
# TODO: Look into adding a hashflood ordered map fall back.
|
|
||||||
# That said, it would require keys to have Ord.
|
|
||||||
# It probably will also pessimize normal use with an extra check on Dict type (maybe that is fine).
|
|
||||||
buckets : List Bucket,
|
buckets : List Bucket,
|
||||||
data : List (k, v),
|
data : List (k, v),
|
||||||
maxBucketCapacity : U64,
|
maxBucketCapacity : U64,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue