On Tue, May 28, 2013 at 02:16:22AM +0200, bearophile wrote: > Sebastian Graf: > > >Plus, the compiler is still able to optimize most of the > >delegate/range fluff away (as opposed to e.g. C#). > > There are several optimizations that D/DMD is not performing on > those ranges and higher order functions. The Haskell compiler GHC > optimized that stuff using purity, library defined "rewrite rules", > stream fusion/deforestation and more.
Library-defined rewrite rules would be über-cool if it were supported in D. *(waits for somebody to mention "AST macros", and everyone else to shout him down. :-P) > DMD does nothing of this, or very little. I think so far Walter has > shown no interest in this. [...] The DMD optimizer certainly leaves a lot of room for improvement. I think Walter would accept pull requests to that effect. ;-) T -- Try to keep an open mind, but not so open your brain falls out. -- theboz
