[racket] Loops and performance

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Dec 3 14:02:27 EST 2011

On Sat, Dec 3, 2011 at 1:31 PM, Sergi Mansilla <sergi.mansilla at gmail.com> wrote:
>
> Anyway, my newbie question is: Is there a way to execute that code
> faster? Perhaps I am in some debug mode, or I can pass parameters to
> racket so it does some optimizations? I am just curious and just
> kicking the tires of Racket. I am not even that interested in high
> performance, but I'd like to know if I am missing something.

At the moment, the inner loop is being compiled about as well as it
can be at the Racket level.  Eventually, more optimizations can and
probably will be done (striding to reduce the number of comparisons in
the loop, for example), and the code generated by the JIT can always
get better.

The only relevant command-line option is to compile (ie, using 'raco
make') with the '--disable-inline' option, and see if that changes
performance for you.  On my machine, however, it produces a 2x
slowdown.
-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.