Re: [racket] Strange time function results

2012-05-16 Thread Robby Findler
DrRacket is doing a lot of work that can disrupt your attempts to time things. To really isolate what is going on with some specific piece of code, you are best off running the timings in 'racket' from the command-line. Robby On Wed, May 16, 2012 at 3:22 PM, Harry Spier wrote: > I've just starte

Re: [racket] Strange time function results

2012-05-16 Thread Harry Spier
Thanks, I didn't realize cpu time includes gc time. and yes its dual core On Wed, May 16, 2012 at 4:31 PM, Eli Barzilay wrote: > A few minutes ago, Harry Spier wrote: >> I've just started using the "time" function to check the timings of >> some functions in my program.  I'm testing the timings

Re: [racket] Strange time function results

2012-05-16 Thread Neil Van Dyke
You should call "collect-garbage" 3 times before each call to "time". That controls for pre-existing garbage a little better. (I do this in "http://www.neilvandyke.org/racket-shootout/";, although I should reimplement that stupid package to use "time-apply".) Neil V. R

Re: [racket] Strange time function results

2012-05-16 Thread Eli Barzilay
A few minutes ago, Harry Spier wrote: > I've just started using the "time" function to check the timings of > some functions in my program. I'm testing the timings of two > functions, each of these functions takes a list of lists and > transforms it into another list of lists. The size of each li

Re: [racket] Strange time function results

2012-05-16 Thread Nick Shelley
I'm definitely not the expert on this, but I just quickly subtracted the gc time from the cpu time and the times look pretty consistent: > (- 7176 4537) 2639 > (- 5600 2949) 2651 > (- 4040 1388) 2652 Also, I would guess that cpu time adds the time of all cores or threads or whatever, so I assume

[racket] Strange time function results

2012-05-16 Thread Harry Spier
I've just started using the "time" function to check the timings of some functions in my program. I'm testing the timings of two functions, each of these functions takes a list of lists and transforms it into another list of lists. The size of each list of lists is in the order of about 1000 x