Comment on Turn O(n^2) reverse into O(n)parentComments−velis_vel12yI find it interesting that correct equational reasoning in this case lead to a correct program, but one with absymal performance.That's not really an interesting property of Haskell, though. You can always write correct but slow code in any language.It'd be interesting to think how one could encode performance characteristics into equations.I've seen the concept of encoding performance in types played around with, but I can't find actual work (if any) that's been done on it.−eru12yYou can always write correct but slow code in any language.Yes, but Haskell makes that exceptionally easy.
Comments
That's not really an interesting property of Haskell, though. You can always write correct but slow code in any language.
I've seen the concept of encoding performance in types played around with, but I can't find actual work (if any) that's been done on it.
Yes, but Haskell makes that exceptionally easy.