-
Notifications
You must be signed in to change notification settings - Fork 23
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
minimal but convincing example? #50
Comments
|
yes, nice. (fib = factorial?) I have to specify (reduce) the number of capabilities (my computer has too many?)
you are throwing away the result (I understand - else we'd be measuring the time for printing), my example above has the advantage that we can see, and compare results. and .. the rabbit holes ... (why cut time only in half, where does the extra |
perhaps this? a slightly silly way of repeatedly computing factorial of 10
or, with ghci:
if we use
warning - more rabbit holes: https://gitlab.haskell.org/ghc/ghc/-/issues/20783 I guess the problem with such examples in ghci is:
Your factorial example is nice because it spends time in GMP (long multiplication) mostly (?). In my example, work is done in |
I would very much want that the documentation contains a minimal convincing example
(and that this would also be included in tests, so we can be sure that it works).
"Convincing" in the sense that
+RTS -N<k>
(for small k) visibly, and progressively, reduces execution timeFor reference, I am using the following C# example (sum of bitcounts) in teaching
and I like that it has these properties:
.AsParallel()
)csharp
REPLIf there is such an example (my naive use of
parListChunk
does not seem to cut it) I'm happy to write it up as haddock and submit a PR.NB - Sure I know (and discuss with students) that there are better implementations of
bc
, and that sum-of-bitcounts (up to powers of two) has a closed form, so we don't actually need any of this...The text was updated successfully, but these errors were encountered: