[Haskell-beginners] ghci timings

mike h mike_k_houghton at yahoo.co.uk
Fri May 25 11:33:32 UTC 2018


Sorry - I’m being stupid, 

Just use last to print the last in the list. List is still evaluated but no real print overhead.
duh.

Mike
> On 25 May 2018, at 12:26, mike h <mike_k_houghton at yahoo.co.uk> wrote:
> 
> Hi,
> I have a function that takes a while to execute and its output is a list of 1000 numbers. I’ve setup ghci to show timings. 
> So in ghci I run the function, it churns away and then starts display the output list and finally shows the timings.
> I’m assuming that the execution time includes the time taken to output the result. Is it possible to get the execution time that does not include the time to output the result? 
> 
> Thanks
> 
> Mike
> 
> 
> 
> 
> 



More information about the Beginners mailing list