Re: [racket-dev] can we write these four lines of C in performant racket?

2011-07-26 Thread Matthew Flatt
At Mon, 25 Jul 2011 08:05:46 -0400, Sam Tobin-Hochstadt wrote: > On Mon, Jul 25, 2011 at 7:51 AM, Matthew Flatt wrote: > > > > Here are some timings for 1000 iterations on 2^20-element inputs > > (32-bit mode, Mac Book Pro 2.53 GHz): > > > >  C as above, gcc -02          :  1409 > >  C with indire

Re: [racket-dev] can we write these four lines of C in performant racket?

2011-07-25 Thread Sam Tobin-Hochstadt
On Mon, Jul 25, 2011 at 7:51 AM, Matthew Flatt wrote: > > Here are some timings for 1000 iterations on 2^20-element inputs > (32-bit mode, Mac Book Pro 2.53 GHz): > >  C as above, gcc -02          :  1409 >  C with indirections, gcc -O2 :  4041 >  C as above, gcc -O0          :  6425 >  C with ind

Re: [racket-dev] can we write these four lines of C in performant racket?

2011-07-25 Thread Matthew Flatt
At Sat, 23 Jul 2011 14:42:15 -0400, John Clements wrote: > This C code adds the content of one buffer to another one, with no checking. > The corresponding racket code runs about 10x slower. Do you folks think that > it > should be possible to do better? (One salient fact: these are > shorts--

Re: [racket-dev] can we write these four lines of C in performant racket?

2011-07-24 Thread Noel Welsh
Is the C code compiled to vectorised assembler? That could account for a factor of about 4-16 depending. N. On Sat, Jul 23, 2011 at 7:42 PM, John Clements wrote: > This C code adds the content of one buffer to another one, with no checking.   > The corresponding racket code runs about 10x slower

Re: [racket-dev] can we write these four lines of C in performant racket?

2011-07-23 Thread John Clements
On Jul 23, 2011, at 2:46 PM, Robby Findler wrote: > What is the data you're using to represent the shorts in Racket? #s. John > > Robby > > On Sat, Jul 23, 2011 at 1:42 PM, John Clements > wrote: >> This C code adds the content of one buffer to another one, with no checking. >> The corre

Re: [racket-dev] can we write these four lines of C in performant racket?

2011-07-23 Thread Robby Findler
What is the data you're using to represent the shorts in Racket? Robby On Sat, Jul 23, 2011 at 1:42 PM, John Clements wrote: > This C code adds the content of one buffer to another one, with no checking.   > The corresponding racket code runs about 10x slower. Do you folks think that > it shoul