Timon Gehr , dans le message (digitalmars.D:145067), a écrit : > I did: http://pastebin.com/2rEdx0RD
Nice! > port of some haskell code from RosettaCode (run it ~20 min to get > results, haskell runs in less than 2s) > http://pastebin.com/Vx4hXvaT > The main performance issue is the garbage collector. Turning it off will > help performance a lot if you have enough RAM. Furthermore, DMD does not > do any advanced optimizations Yes, we would certainly get a lot more performance with a specialized memory usage. Shuting off the GC and freeing manually delegate context when they are computed may help a lot. We may also improve by using more CTFE, and less Laziness (LList for instance is a bit too much lazy). The code must stop everytimes it gets a Lazy objet just to know if it must compute the value or just use it. We must use the processor while it has to wait. Multiple thread can help, but I guess Haskell compliers have much better tools to do that. I doubt we can reach a descent fraction of Haskell's speed, but it sounds a fun thing to do, so I may give it a try. That would be good for my optimization skills :) -- Christophe
