rtfeldman / elm-css

Typed CSS in Elm.
https://package.elm-lang.org/packages/rtfeldman/elm-css/latest
BSD 3-Clause "New" or "Revised" License
1.23k stars 196 forks source link

Use fnv hash #546

Closed robinheghan closed 2 years ago

robinheghan commented 2 years ago

This replaces the current Murmur3 based hash function with a FNV-based hash function.

Rationale can be found here: https://github.com/robinheghan/fnv1a/blob/main/docs/why_fnv_is_great_for_elm.md

Modest speedup in Chrome (~5%) while Safari and Firefox see huge increase in performance. With all my changes (past PRs included) Safari jumps from ~40% improvement to 55-60% improvement. FF jumps from ~35% to ~50%.