[racket] (define best (compose car sort))
And don't time things in DrRacket.
On Jan 18, 2014, at 6:03 PM, Neil Van Dyke wrote:
> You probably want to consider space efficiency in addition to time efficiency. For example, why store O(n) if you only need to store O(1).
>
> Also, when you time some code, you generally want do 3 "collect-garbage" before starting, or GC due to other code might be throwing off your numbers. I also like to do 3 "collect-garbage" after the code being timed has finished, and look at how long the GC took, and whatever metrics the GC gives for what has been reclaimed.
>
> Neil V.
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users