
13 Oct
2006
13 Oct
'06
7:52 a.m.
The (almost) point-free versions run faster than my "fast" imperative version and take up significantly less heap space-- even the version which reads everything and then writes takes up about 1/3 the heap space as my version.
That was not intended, though I'm very pleased :-D
I get the impression that point-free style is a preventive measure against space leaks.
Ah, good point, I didn't think about it that way. Point-less makes a bit sure that old values are not leaking around as they are not passed through the "pipe". Yet, I'm a bit astonished. I thought that when compiling with -O2, cosmetic changes should become negligible. Perhaps the strict foldl' has an effect? Regards, afpelmus