stbuehler/haskell-nettle

test-umac uses up more memory than I have

clinty opened this issue · 2 comments

I think there's a problem with repString building up thunks on the 2^25 test vectors.

I guess I'll have to profile it somehow... or remove that test.

I found the issues; although the list gets evaluated lazily just as it should be, it remembers the list as it is still referenced for reusage.

I "hacked" it now to unshare the list by making it a Int -> [B.ByteString] function, which should work unless haskell starts inlining everything (given the complexity of the data structures involved I think this is unlikely).