I'm always worried about perf when I'm writing mtl-style code, especially wrt Lucid because, early-on I discovered unexpected perf issues - https://github.com/chrisdone/lucid/issues/63
Are there any thumb-rules to get good perf out-of-the-box when writing mt-style code? i.e. without having to necessarily benchmark stuff (because benchmarking properly takes a considerable amount of time).
I started noticing some severe performance drop when combining Scotty's ActionT with Lucid's HtmlT. A little benchmarking produced the following: https://github.com/vacationlabs/monad-trans...
This is a proposal for adding primops for capturing slices of the RTS stack to improve the performance of algebraic effect systems, which require delimited continuations.
Rendered
I'm always worried about perf when I'm writing mtl-style code, especially wrt Lucid because, early-on I discovered unexpected perf issues - https://github.com/chrisdone/lucid/issues/63
Are there any thumb-rules to get good perf out-of-the-box when writing mt-style code? i.e. without having to necessarily benchmark stuff (because benchmarking properly takes a considerable amount of time).
One idea is to use
inspection-testing
to make sure there are noMonad
dictionaries being passed in the optimized Core.There is definitely some related reading here - https://github.com/ghc-proposals/ghc-proposals/pull/313
I think there was some ""conclusion"" (please don't quote me! :D) that you need some
SPECIALISE
pragmas (formtl
)I'm pretty sure Alexis has written up a lot of stuff somewhere else too, but I can't find it (or maybe it's already covered in the proposal)