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 wrote:
> Tip: To get reliable results, garbage collect before the timing.
>
> /Jens Axel
>
>
> 2012/2/5 Sergi Mansilla
>>
>> Hi,
>>
>> For benchma
You want to use the `time-apply' function. The documentation is here:
http://docs.racket-lang.org/reference/time.html?q=time-apply#%28def._%28%28quote._~23~25kernel%29._time-apply%29%29
In general, (time e) can be converted to (time-apply (lambda () e)
'()), which produces values instead of print
On 2012-02-05 16:27:17 +0100, Sergi Mansilla wrote:
> 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`?
`time`
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'
4 matches
Mail list logo