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:
Brendan Hansknecht 2023-12-08 23:33:07 -08:00
parent 28e4ae8ae5
commit ba28ba7ca3
No known key found for this signature in database
GPG key ID: A199D0660F95F948

View file

@ -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,