
Paul Johnson wrote:
Andrew Coppin wrote:
Program with no particular optimisations: 0.35 seconds. Program with stream fusion [and GHC HEAD]: 0.25 seconds. Program with stream fusion and ByteString: 0.05 seconds.
Surely you'd have to work pretty hard to get that kind of speed even in C. ;-)
...erm, actually no. Somebody sat down and wrote something in five minutes that takes 0.005 seconds. Oops! You may also be paying a fixed cost penalty in GHC run-time initialization. Try increasing N and see what happens.
Yeah. Hence the "we should use something that takes tens of seconds". ;-) (I suppose I could try writing a nop program and timing it. But personally I don't have any way of timing things to that degree of accuracy. I understand there are command line tools on Unix that will do it, but not here.)