[racket] deceptive perfomance for typed racket in integer division

From: Neil Toronto (neil.toronto at gmail.com)
Date: Tue Dec 11 13:09:36 EST 2012

On 12/11/2012 09:59 AM, Sam Tobin-Hochstadt wrote:
> On Tue, Dec 11, 2012 at 11:43 AM, daniel rupis
>>    I am using racket from the console, not using DrRacket.   I just copy the code
>> with control-c and paste with control-v then wait a seconds for the definitions
>> to be loaded in memory and then run the test.
>>
>>   I was going to use raco exce ... but it asks about a module (perhaps I should
>> read the section about using raco to generate a standalone executable).
>
> To get the best performance from Racket, and in general for other
> benefits of Racket, code should be written in a module.  Most
> straightforwardly, this means placing it in a file with `#lang
> racket/base` at the top, and then running that file with `racket
> filename.rkt`.

I've had good success running DrRacket and selecting "No debugging or 
profiling" and deselecting "Preserve stacktrace" in the Language dialog. 
Most of the time, I get performance similar to command-line Racket. I 
think the only significant difference between running a module in that 
environment and running it using command-line Racket is that in 
DrRacket, GC pauses tend to be longer because there's a larger heap.

Of course, if you're serious about comparing with another language, you 
should use the command line.

Neil ⊥


Posted on the users mailing list.