Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6680873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:31:33+00:00 2026-05-26T04:31:33+00:00

When reading through parfib.hs code on github, I saw this comment about memory allocation

  • 0

When reading through parfib.hs code on github, I saw this comment about memory allocation for monadic version:

Monad-par version:
fib(38) non-threaded: 23.3s 23.1s
fib(38) 1 thread :    24.7s 24.5s
fib(38) 4 threads:     8.2s 31.3s
fib(40) 4 threads:    20.6s 78.6s **240GB allocated**

Is there any paper or blog post that explains this huge memory footprint? The memory allocation of non-monadic version is documented in the code comment as 17GB (for fib(42)). I searched through par monad papers and presentation by Simon Marlow but I haven’t seen any analysis of the memory footprints for parfib.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:31:33+00:00Added an answer on May 26, 2026 at 4:31 am

    I think that was my comment in the source code. The biggest problem is that the default implementation of monad-par uses an elegant but potentially inefficient architecture where the Par computation generates a trace of Par actions as a lazy data structure. This is great for separating out the scheduler logic, but the compiler is not fully deforesting (eliminating) the intermediate data structure.

    There are various well-known ways to make this better. It’s just taking us time to implement them. If you look at some of the recent development (on branches) on the github repository we are beginning to populate monad-par with some of the alternate scheduling strategies explored in its predecessor work (“Haskell CnC”).

    We are hoping to change the default scheduler in the next major release to something with a parfib behavior significantly closer to “raw” par/pseq.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Reading through this question on multi-threaded javascript, I was wondering if there would be
I have been reading through the C++ FAQ and was curious about the friend
I'm reading through A Gentle Introduction to Haskell, and early on it uses this
Reading through more SICP and I'm stuck on exercise 1.3.8 . My code works
Reading through this , I came to the bit on default values for function
Reading through an Article about custom Objects: http://technet.microsoft.com/en-us/library/ff730946.aspx I wonder why i get a
Whilst reading through the DirectWrite source code I came across the following struct: ///
I'm reading through some MSDN example code on Composite controls and finding that there
I'm reading through Beginning Ruby and I'm stuck at the part about private and
I'm reading through the TAP Whitepaper , and am confused by this sample given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.