Writing an OS in Haskell - agniv sarkar : r/haskell
In GHC, IO (Maybe a) would allocate and pattern match at every step, so forall r. r -> (a -> r) -> IO r is more efficient. Does MicroHS have the same issue? MicroHs allocates all the time. There is no way to avoid it. It's part of the paradigm when using combinators. It's one of the big drawbacks. Even the simplest execution allocates. Are you sure? I haven't checked, but I'm pretty sure your case just trades it for closure allocation. 🤷 I'm mostly speaking from common talking points of using CPS to avoid pattern matching at every bind: https://wiki.haskell.org/Performance/Monads Well, the wiki page has this: MaybeCPS should be faster than using Maybe in most cases and should be almost a drop in replacement for Maybe. Unfortunately, this may not necessarily be true. And the conversation from the link seems to confirm my suspicion. I wonder if it's specific to Maybe, and maybe the optimization only works for Either 300% penalty is a lot. Do effect systems have a similar performance hit
Reddit - Please wait for verification
Explore this link on the map →related reading
- abseil / Performance Hintsabseil.io
- performance - Why is Haskell (GHC) so darn fast? - Stack Overflowstackoverflow.com
- abseil / Performance Hintsabseil.io
- Leaving Haskell behind - Infinite Negative Utilityjournal.infinitenegativeutility.com
- Making Deep Learning go Brrrr From First Principleshorace.io
- Algorithms for Modern Hardware - Algorithmicaen.algorithmica.org
- Infographics: Operation Costs in CPU Clock Cycles - 6IT6it.dev
- Why (most) High Level Languages are Slow // A Random Walk Through Geek-Spacesebastiansylvan.com
- Speed mattersscattered-thoughts.net
- GitHub - system-f/fp-course: Functional Programming Course · GitHubgithub.com
- Writing an OS in Haskell - agniv sarkarold.agniv.me
- Chris Allen - Functional Educationbitemyapp.com