...let's see what's happening.
First, the single sample point faked us out, making us think we were using less RAM than we really were. We are chewing up pretty nearly ten megabytes--still less than that C program, but a bit disappointing.
Or maybe more disappointing than we thought. Here's the output describing heap usage from a run with the options +RTS -sstderr:
202,392,800 bytes allocated in the heap
84,601,736 bytes copied during GC
12,550,176 bytes maximum residency (8 sample(s))
220,824 bytes maximum slop
30 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max pause
Gen 0 387 colls, 0 par 0.10s 0.10s 0.0003s 0.0009s
Gen 1 8 colls, 0 par 0.06s 0.06s 0.0080s 0.0230s
INIT time 0.00s ( 0.00s elapsed)
MUT time 0.19s ( 0.20s elapsed)
GC time 0.16s ( 0.16s elapsed)
RP time 0.00s ( 0.00s elapsed)
PROF time 0.00s ( 0.00s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 0.36s ( 0.36s elapsed)
%GC time 45.2% (45.3% elapsed)
Alloc rate 1,028,021,469 bytes per MUT second
Productivity 54.8% of total user, 55.0% of total elapsed
Whoa. Nearly half our time spent garbage collecting? There's got to be a way to improve that. (And on the graph, nearly two megabytes taken by pairsum?)
random notes and thoughts, mostly about Haskell these days, of a rather past middle-aged programmer
Subscribe to:
Post Comments (Atom)
Riddler Classic, May 23, 2020—Holy Mackerel!
Another one using Peter Norvig's word list . It turns out that the word "mackerel" has a curious property: there is exactly ...
-
Back in the Cretaceous era I worked at the University of Oklahoma as a student assistant at Remote 1. OU was a [shudder] IBM big iron shop a...
-
You've probably heard about how the notion of sum types (e.g. Algol 68 union s, Rust enum s, Haskell type s) and product types (e.g. tup...
-
Verbal Abuse as Entertainment When I grew up, my parents always told me that there was a sort of person who needed to tear down others t...
No comments:
Post a Comment