[Haskell-cafe] list comprehansion performance has hug different

Artyom Kazak artyom.kazak at gmail.com
Tue Jan 29 11:33:58 CET 2013


Junior White <efiish at gmail.com> писал(а) в своём письме Tue, 29 Jan 2013  
12:59:31 +0300:

> So this is a problem in lazy evaluation language, it will not appear in
> python or erlang, am i right?

Not quite. Compilers of imperative languages don’t perform CSE (common  
subexpression elimination) either; `queens' (k-1)` could have some side  
effects, after all, and performing a side effect only once instead of n  
times is a definite bug.



More information about the Haskell-Cafe mailing list