
7 Oct
2004
7 Oct
'04
9:04 a.m.
Here is a quick fix for the Random Numbers category. Looks like a classic space-leak, again on the arithmetic operations. Speeds up results for me about 6X and brings memory usage down out of the stratosphere. w/o strictness: ~/shootout$ time random 900000 +RTS -K32000000 75.544410151 real 0m0.756s user 0m0.670s sys 0m0.050s w/ strictness: ~/shootout$ time random 900000 # <-- don't need massive heap 75.544410151 real 0m0.139s user 0m0.100s sys 0m0.010s -- Robert robdockins@fastmail.fm