Speeding up Data.List.inits

Henning Thielemann schlepptop at henning-thielemann.de
Sat Jul 19 08:29:16 UTC 2014


Am 19.07.2014 10:25, schrieb David Feuer:
> I'm not sure about the theory of it, but if I load the module in GHCi
> and run
> head $ last $ initsR [0..100000::Int]
> I get a response *immediately*.
> If I run
> head $ last $ initsDL [0..100000::Int]
> I wrote this email while waiting for that to complete, and gave up on
> it. There may be an asymptotic performance bug here.

Sorry, I got the implementation of initsDL wrong (recursed into the 
wrong inits-function).



More information about the Libraries mailing list