Yes indeed (and thanks all).

My question still holds though: Can I expect the JIT to optimize the cases
of my primary concern? (Or are these cases unlikely to be a bottleneck?)
I'm unsure about how to set up correct stress tests as the JIT does a good
job at optimizing a number of things and then I'm not sure what precisely
I'm measuring.

On Fri, Jul 31, 2015 at 4:25 PM, Vincent St-Amour <
stamo...@eecs.northwestern.edu> wrote:

> FWIW, the optimization coach reports these kinds of issues, and
> recommends that solution.
>
> Vincent
>
>
>
> On Fri, 31 Jul 2015 09:03:53 -0500,
> Laurent wrote:
> >
> > Oh wow, this makes a huge difference indeed! (both in-range and v6.2)
> > Congrats for the efforts put in the new version!
> >
> > I don't really understand why `in-range` makes such a difference. It
> > looks like the kind of sequence iterator is tested at each step, whereas
> > I was expecting it to be tested only at the beginning of the loop, since
> > this sequence iterator kind can't change from one iteration to the next,
> > right?
> >
> > Hence, I was expecting the `in-range` (and actually all other `in-*`)
> > issue to appear only inside nested loops, where some loops are started
> > many times (thus requiring many iterator kind tests).
> >
> > Neil: Sure :)
> >
> > On Fri, Jul 31, 2015 at 2:21 PM, Matthew Flatt <mfl...@cs.utah.edu>
> > wrote:
> >
> >     Also, which version of Racket are you using? With v6.1.1 and
> >     `in-range`, I get
> >
> >     cpu time: 745 real time: 744 gc time: 0
> >     cpu time: 205 real time: 205 gc time: 0
> >     cpu time: 782 real time: 782 gc time: 0
> >     cpu time: 205 real time: 206 gc time: 0
> >
> >     but with v6.2 and `in-range`, I get
> >
> >     cpu time: 209 real time: 209 gc time: 0
> >     cpu time: 204 real time: 203 gc time: 0
> >     cpu time: 206 real time: 206 gc time: 0
> >     cpu time: 203 real time: 204 gc time: 0
> >
> >     At Fri, 31 Jul 2015 14:05:57 +0100, Laurent wrote:
> >
> >
> >     > Hi,
> >     >
> >     > A little stress test seems to suggest that the JIT is currently
> >     not able to
> >     > optimize closures with static arguments:
> >     > https://gist.github.com/Metaxal/4beb286cacc0966b433a
> >     >
> >     > That's a simplified version of some cases of mine where several
> >     complex
> >     > procedures that look very much alike, so I'd really like to avoid
> >     > copy/paste/maintain, but these procedures are also inside
> >     intensive loops,
> >     > so I'd really like to not sacrifice speed.
> >     >
> >     > Is there a better way to write this code with copy/paste to allow
> >     for
> >     > optimizations?
> >     >
> >     > Thanks,
> >     > Laurent
> >     >
> >
> >
> >     > --
> >     > You received this message because you are subscribed to the Google
> >     Groups
> >     > "Racket Users" group.
> >     > To unsubscribe from this group and stop receiving emails from it,
> >     send an
> >     > email to racket-users+unsubscr...@googlegroups.com.
> >     > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to