Created
July 3, 2013 18:44
-
-
Save qrilka/5921567 to your computer and use it in GitHub Desktop.
Endo difflists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| λ> import Data.Monoid | |
| λ> let s = take 20000000 $ repeat 'a' | |
| λ> :set +s | |
| λ> length $ appEndo(Endo (s ++) `mappend` Endo (s ++) ) [] | |
| 40000000 | |
| (0.86 secs, 2242175512 bytes) | |
| λ> length $ appEndo(Endo (++ s) `mappend` Endo (++ s) ) [] | |
| 40000000 | |
| (0.26 secs, 1121875736 bytes) | |
| λ> length $ appEndo(Endo (++ s) `mappend` Endo (++ s)`mappend` Endo (++ s) ) [] | |
| 60000000 | |
| (0.62 secs, 3362517000 bytes) | |
| λ> length $ appEndo(Endo (s ++) `mappend` Endo (s ++) `mappend` Endo (s ++)) [] | |
| 60000000 | |
| (1.53 secs, 3361937832 bytes) | |
| λ> length $ s ++ s ++ s ++ [] | |
| 60000000 | |
| (1.54 secs, 3361416360 bytes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment