horde-ad icon indicating copy to clipboard operation
horde-ad copied to clipboard

Unpack r in Delta datatypes via backpack, class or otherwise

Open Mikolaj opened this issue 2 years ago • 1 comments

This is low priority, because it's going to be a few (dozen) percent speedup (and a slight space saving and improved storage locality, which may be more important in real world situations). See https://hackage.haskell.org/package/unpacked-containers for a similar endeavour and https://twitter.com/kmett/status/982078739482738688 for a benchmarking anecdote.

I hope this now has a trivial solution and I was just not paying attention. Parameterized datatype not being a zero-cost abstraction is embarrassing. (Of course we could easily avoid the embarrassment by not implementing the datatype field upacking optimization in GHC, which few, if any, programming languages support.)

Mikolaj avatar Mar 25 '22 10:03 Mikolaj