Closed gnzlbg closed 6 years ago
In the /r/rust thread: https://www.reddit.com/r/rust/comments/7pe925/more_examples_of_haskell_running_5x_faster_than/
people mentioned that:
factorials_ramp(0)
0
1
AddAssign
+=
+
Thought I would mention these here in case you hadn't seen the thread, good work! I liked the article!
Explanations regarding caching and how to verify results here.
Not really sure where += would be useful.
You can check that it's memoized by Debug.Trace.traceing the multiplication if you're skeptical.
Debug.Trace.trace
In the /r/rust thread: https://www.reddit.com/r/rust/comments/7pe925/more_examples_of_haskell_running_5x_faster_than/
people mentioned that:
factorials_ramp(0)
returns0
instead of1
)AddAssign
(+=
) which is faster than+
.Thought I would mention these here in case you hadn't seen the thread, good work! I liked the article!