Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Haskell implementation #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrismwendt
Copy link

stack run coroutines 1000000 (1M) uses 12GB of RAM on my machine.

@runjak
Copy link

runjak commented Jun 1, 2023

Hey 👋

I've also tried my hands at a Haskell implementation, and it's at runjak/async-runtimes-benchmarks.

While I was aware of Control.Concurrent.Async I went with Control.Concurrent.Chan instead (and quite a long list, that I suspect growing slow). How would you feel about introducing separate subdirectories?

I must also admit that I went for a bit of a more naïve setup (no stack, no cabal, only ghc ^^).

Anyway, in terms of results - I'm aiming to write them up a bit more, but so far I got 575428 and 694560 the results.

@runjak
Copy link

runjak commented Jun 2, 2023

I think the decision around RTS stuff makes a big difference with Haskell.

Most recent changes on my end get 465220 (<470MB) for 1M when running single threaded, but 9611132 (>9.6GB) when compiling with -threaded -rtsopts -with-rtsopts=-N and running on 8 threads.

@runjak
Copy link

runjak commented Jun 2, 2023

Sorry for being so spammy.
Upon further investigation I'm not currently confident that my attempts actually run as concurrent as desired.

With your code I get comparable memory usage - which is somewhat unexpected to me, but quite interesting nevertheless.

Thanks for sharing it 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants