Author | Message |
---|---|
gchan10
Posts: 27
|
Posted 11:05 Feb 17, 2019 |
Hi all, Under the most optimal circumstances, what would be the expected performance of the Haskell code for the first part? Thanks. |
kmarlis
Posts: 35
|
Posted 11:07 Feb 17, 2019 |
Which implementation do you mean by the first part? |
gchan10
Posts: 27
|
Posted 11:21 Feb 17, 2019 |
Sorry, I meant all of the code we were expected to translate to Haskell in the Python notebook. So the question is, after we translate the code in the notebook from Python to Haskell, what would the expected performance of the Haskell code be? Thanks again. |
kmarlis
Posts: 35
|
Posted 11:26 Feb 17, 2019 |
Oh for every implementation? For me, they are similar in scale to Python, that is fib_top_down_iter without any optimization performs much worse than the others. Does that help? |
gchan10
Posts: 27
|
Posted 11:34 Feb 17, 2019 |
What about the average runtime of the program? Like, how long did it take to execute in seconds for each part? Edit: BTW it did help, thank you. Last edited by gchan10 at
11:36 Feb 17, 2019.
|
rabbott
Posts: 1649
|
Posted 12:26 Feb 17, 2019 |
My Haskell version of My Haskell version of > fib_top_down_rec 32
Last edited by rabbott at
14:22 Feb 17, 2019.
|
jungsoolim
Posts: 38
|
Posted 20:47 Feb 17, 2019 |
With cache, it takes 0.01 sec while my fib_top_down_iter takes over 45 seconds! ghci> fib_top_down_iter_with_cache 32 Thanks!
|