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.

Reply via email to