A rebase of !6340 (closed), which was itself a rebase of !5068 (closed). I attached NOINLINE to dec
and enc
, hoping that doing so wouldn't affect inlining decisions and thus regress ghc/alloc perf the same way !6340 (closed) did.
It does not make sense to inline dec
and enc
; their implementation cannot be simplified further. Except for the obvious unboxing worker/wrapper split that we do for NOINLINE too, thankfully. Both dec
and enc
are very cheap to compute, despite their apparent code size. It should be an adequate guard against degenerate WordMaps as described in #20222 (closed)/#19820/#19414 (closed).
Edited by Sebastian Graf