
Glad to have been helpful :)
Bests,
Alfredo
Sent from my iPad
On 17/ott/2012, at 21:10, Dmitry Vyal
On 10/17/2012 12:45 PM, Alfredo Di Napoli wrote:
What about this? I've tested on my pc and seems pretty fast. The trick is to generate the gen only once. Not sure if the inlines helps, though:
What about this? I've tested on my pc and seems pretty fast. The trick is to generate the gen only once. Not sure if the inlines helps, though ...
Wow, haskell-cafe is a wonderful place! In just a two hours program run time automagically improved 20x ;) Thanks Alfredo, code works wonderful. Compared to mine implementation it's 2.5 sec vs 50 sec on my laptop. Interesting, how it compares to C now.
Inlining makes about 50x difference when code compiled without optimization. A nice example.
Best wishes, Dmitry