[racket] deceptive perfomance for typed racket in integer division

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Dec 11 11:28:38 EST 2012

On Tue, Dec 11, 2012 at 11:23 AM, Pierpaolo Bernardi
<olopierpa at gmail.com> wrote:
> On Tue, Dec 11, 2012 at 5:08 PM, daniel rupis
> <danielrupistralizavez at yahoo.es> wrote:
>> Pierpaolo Bernardi <olopierpa at ...> writes:
>
>>> Remember to generate an executable, to obtain the maximum speed.
>
>
>> Welcome to Racket v5.3.1.
>>
>>
>> (define (test)
>>   (time (displayln (total-primes 60999))))> > > >
>>> (test)
>> 6145
>> cpu time: 39170 real time: 39156 gc time: 0
>>
>>  Using ubuntu 12.04 and racket
>
> This looks like you are testing from inside DrRacket.  As I already
> wrote you should generate an executable and measure that.
>
> If you run the test from inside DrRacket, you are measuring DrRacket
> overhead, which is far from negligible.

While you're certainly right about DrRacket introducing noise in
performance measurement, I don't think you need to generate an
executable to eliminate that overhead.  Simply running `racket` from
the command line on a file in a module ought to be sufficient.

Sam

Posted on the users mailing list.