Is there a simple method to compute time of function execution in Haskell?
Simplest things is to just do :set +s
in ghci
, and then you can see the execution time of anything you run, along with memory usage.
The criterion
package was made specifically to do this well.
See if http://hackage.haskell.org/package/timeit suits your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With