Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-12 Thread Robby Findler
FWIW, big GCs are usually multiple seconds. But minor collections are in that neighborhood and those happen more randomly when running inside DrRacket. Robby On Wed, Dec 12, 2012 at 7:12 AM, Pierpaolo Bernardi wrote: > On Tue, Dec 11, 2012 at 7:09 PM, Neil Toronto wrote: > >> I've had good succ

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-12 Thread Pierpaolo Bernardi
On Tue, Dec 11, 2012 at 7:09 PM, Neil Toronto wrote: > 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 signific

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Neil Toronto
On 12/11/2012 08:03 AM, daniel rupis wrote: I should say that I like racket, but I find macros in racket rather difficult. I can use macros in common-lisp but I still can't use racket macros. (I am trying to say that perhaps macros in racket are something difficult to grasp). Yeah, dealing wi

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Neil Toronto
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

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Vincent St-Amour
At Tue, 11 Dec 2012 16:43:25 + (UTC), daniel rupis wrote: > Anyway, my point was that I was expecting something more from typed racket. > Since typed racket use types (like declaring type in sbcl) I was expected > better > perfomance, that's all. There's a big difference between Typed Racket

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Sam Tobin-Hochstadt
On Tue, Dec 11, 2012 at 11:43 AM, daniel rupis wrote: > Sam Tobin-Hochstadt writes: > >> >> 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 >>

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread daniel rupis
Sam Tobin-Hochstadt writes: > > 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

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Pierpaolo Bernardi
On Tue, Dec 11, 2012 at 5:28 PM, Sam Tobin-Hochstadt wrote: >> 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

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Veer Singh
Sorry my mistake , it is 6.8 seconds. :) . Veer On Tue, Dec 11, 2012 at 9:52 PM, daniel rupis wrote: > Veer Singh writes: > >> >> I am getting 6.8 ms without modifying the code. >> When I change modulo to remainder I get 6.3 ms consistently. > > > I think you mean 6.8 seconds not milliseconds

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Sam Tobin-Hochstadt
On Tue, Dec 11, 2012 at 11:23 AM, Pierpaolo Bernardi wrote: > On Tue, Dec 11, 2012 at 5:08 PM, daniel rupis > wrote: >> Pierpaolo Bernardi writes: > >>> Remember to generate an executable, to obtain the maximum speed. > > >> Welcome to Racket v5.3.1. >> >> >> (define (test) >> (time (displayln

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Pierpaolo Bernardi
On Tue, Dec 11, 2012 at 5:23 PM, Pierpaolo Bernardi wrote: > If you run the test from inside DrRacket, you are measuring DrRacket > overhead, which is far from negligible. As an example, the test I just sent, with the limit changed to 60999, on my machine runs in 20083 ms from inside DrRacket, w

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Pierpaolo Bernardi
On Tue, Dec 11, 2012 at 5:08 PM, daniel rupis wrote: > Pierpaolo Bernardi 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 tim

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread daniel rupis
Veer Singh writes: > > I am getting 6.8 ms without modifying the code. > When I change modulo to remainder I get 6.3 ms consistently. I think you mean 6.8 seconds not milliseconds. Try with the bigger n to remove transient behaviour. Racket Users list: http://lists

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread daniel rupis
Pierpaolo Bernardi writes: > > On Tue, Dec 11, 2012 at 4:03 PM, daniel rupis > wrote: > > > > I was comparing some code in Qi with that of sbcl, I posted a question in > > comp.lang.lisp asking for a way to improve the perfomance, WJ gave a typed > > racket version that was slower than sbcl an

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Veer Singh
I am getting 6.8 ms without modifying the code. When I change modulo to remainder I get 6.3 ms consistently. Veer. On Tue, Dec 11, 2012 at 8:33 PM, daniel rupis wrote: > > I was comparing some code in Qi with that of sbcl, I posted a question in > comp.lang.lisp asking for a way to improve the

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread Pierpaolo Bernardi
On Tue, Dec 11, 2012 at 4:03 PM, daniel rupis wrote: > > I was comparing some code in Qi with that of sbcl, I posted a question in > comp.lang.lisp asking for a way to improve the perfomance, WJ gave a typed > racket version that was slower than sbcl and also much slower than cpp. The sbcl versi

[racket] deceptive perfomance for typed racket in integer division

2012-12-11 Thread daniel rupis
I was comparing some code in Qi with that of sbcl, I posted a question in comp.lang.lisp asking for a way to improve the perfomance, WJ gave a typed racket version that was slower than sbcl and also much slower than cpp. Daniel Rupis wrote: Note: The code compute the number of primes below 3