sayo-hs / heftia

higher-order algebraic effects done right for Haskell
Mozilla Public License 2.0
64 stars 2 forks source link

Improve performance #12

Closed ymdryo closed 1 month ago

ymdryo commented 2 months ago

https://github.com/sayo-hs/heftia/issues/1#issuecomment-2336808234

https://www.reddit.com/r/haskell/comments/1fbvmo8/comment/lm5m98m/ https://github.com/haskell-effectful/effectful/pull/241

The results are quite poor. Originally, this library started as a test to see if the ideas related to semantics could be implemented, so I think performance wasn't considered much. Since I'm not very knowledgeable about performance optimization in Haskell, I might have unknowingly written slow code.

Theoretically, I believe it should perform similarly to freer-simple. It seems that improvement is needed.

ymdryo commented 1 month ago

I’ve moved my monologues here: https://mastodon.social/@ymdfield/113162861185756407

ymdryo commented 1 month ago

Performance research on various optimization techniques (Generalized Evidence Passing, FTCQueue in freer-simple) is completed. I'll begin implementing the next version of Heftia (v0.4), incorporating all performance improvements to the best of my knowledge. Please stay tuned! Contributions are still welcome!

ymdryo commented 1 month ago

I've released Heftia v0.4. The performance is now on par with freer-simple. https://github.com/sayo-hs/heftia/blob/v0.4.0/benchmark/performance.md