On Wed, Jun 3, 2009 at 11:47 AM, Nico Rolle
<nrolle@web.de> wrote:
hi there
is there a quick way to check which function is doing the job quicker?
i have 2 functions which i want to compare.
both give the same output but they do it in different manner.
i want to test which one is faster.
i use ghci.
Be wary of timing things in GHCi. By default there are no optimizations in ghci so you could find that one implementation is much worse than the other but the situation might be completely different when optimizations are enabled. I'm pretty sure if you start ghci with the -O flag that it will use optimizations.
Jason