[racket] Optimization

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jun 16 06:52:14 EDT 2014

At Mon, 16 Jun 2014 14:14:55 +0400, Roman Klochkov wrote:
>  I remade program to avoid optimizing out calulations and reduce GCing
>  [...]
> and even
> cpu time: 0 real time: 0 gc time: 0
> cpu time: 63 real time: 63 gc time: 47
> cpu time: 15 real time: 15 gc time: 0
> cpu time: 16 real time: 16 gc time: 0
> cpu time: 16 real time: 16 gc time: 0
> cpu time: 0 real time: 0 gc time: 0
> cpu time: 15 real time: 15 gc time: 0
> cpu time: 16 real time: 16 gc time: 0
> cpu time: 15 real time: 15 gc time: 0
> 
> 
> Where are these zeros from (especially on first run)?

I think the time counter on Windows has a roughly 16-millisecond
resolution, so you see 0 when the actual time drops just below that
resolution. Note that all of the values are close to multiples of 16.


Posted on the users mailing list.