[racket] Extract values from `time` function
Thanks a lot, makes sense now.
Jens: Good tip about garbage-collecting before doing the benchmark!
On Sun, Feb 5, 2012 at 6:27 PM, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
> Tip: To get reliable results, garbage collect before the timing.
>
> /Jens Axel
>
>
> 2012/2/5 Sergi Mansilla <sergi.mansilla at gmail.com>
>>
>> Hi,
>>
>> For benchmarking purposes, I am running a function hundreds of times
>> and want to make an average of the time it spends running. For that
>> purpose I am now using `current-inexact-milliseconds` before and after
>> he loop, and then subtracting both times and dividing by the
>> iterations performed.
>>
>> I'd like to do that with the `time` function, but I can't figure out
>> how to extract the values it prints, since it doesn't seem to be a
>> return value. I am clearly missing something obvious. How can I use
>> values returned by `time`?
>>
>> Thanks a lot,
>>
>> Sergi
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>
>
>
>
> --
> --
> Jens Axel Søgaard
>
>