horde-ad
horde-ad copied to clipboard
Unpack r in Delta datatypes via backpack, class or otherwise
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.)