Re: svn commit: r229415 - head/lib/libvgl

2012-01-10 Thread Dimitry Andric
On 2012-01-10 05:48, Eitan Adler wrote: On Mon, Jan 9, 2012 at 11:02 PM, John-Mark Gurneyj...@funkthat.com wrote: Last time I did benchmarking on this ~10 years ago, it was slower to use xor instead of using assignments... I'd be shocked if the compiler didn't optimize this away to an XCHG.

Re: svn commit: r229415 - head/lib/libvgl

2012-01-10 Thread Dimitry Andric
On 2012-01-03 20:47, Pedro F. Giffuni wrote: Author: pfg Date: Tue Jan 3 19:47:32 2012 New Revision: 229415 URL: http://svn.freebsd.org/changeset/base/229415 Log: Integrate the line drawing algorithm from the book Graphic Gems 1. http://www.graphicsgems.org/ At the time it claimed

Re: svn commit: r229415 - head/lib/libvgl

2012-01-10 Thread Pedro Giffuni
Hello; --- Mar 10/1/12, Dimitry Andric d...@freebsd.org ha scritto: Data: Martedì 10 gennaio 2012, 03:07 On 2012-01-03 20:47, Pedro F. Giffuni wrote: Author: pfg Date: Tue Jan  3 19:47:32 2012 New Revision: 229415 URL: http://svn.freebsd.org/changeset/base/229415 Log:    

Re: svn commit: r229415 - head/lib/libvgl

2012-01-10 Thread John-Mark Gurney
Eitan Adler wrote this message on Mon, Jan 09, 2012 at 23:48 -0500: On Mon, Jan 9, 2012 at 11:02 PM, John-Mark Gurney j...@funkthat.com wrote: Last time I did benchmarking on this ~10 years ago, it was slower to use xor instead of using assignments... I'd be shocked if the compiler didn't

Re: svn commit: r229415 - head/lib/libvgl

2012-01-10 Thread Pedro Giffuni
--- Mar 10/1/12, John-Mark Gurney j...@funkthat.com ha scritto: Eitan Adler wrote this message on Mon, Jan 09, 2012 at 23:48 -0500: On Mon, Jan 9, 2012 at 11:02 PM, John-Mark Gurney j...@funkthat.com wrote: Last time I did benchmarking on this ~10 years ago, it was slower to use xor

Re: svn commit: r229415 - head/lib/libvgl

2012-01-09 Thread John-Mark Gurney
Pedro F. Giffuni wrote this message on Tue, Jan 03, 2012 at 19:47 +: +#define SL_SWAP(a,b) {a^=b; b^=a; a^=b;} Can we replace this w/ a normal swap function? Last time I did benchmarking on this ~10 years ago, it was slower to use xor instead of using assignments... --

Re: svn commit: r229415 - head/lib/libvgl

2012-01-09 Thread Pedro Giffuni
Hi John; --- Lun 9/1/12, John-Mark Gurney j...@funkthat.com ha scritto: ... Pedro F. Giffuni wrote this message on Tue, Jan 03, 2012 at 19:47 +: +#define SL_SWAP(a,b)           {a^=b; b^=a; a^=b;} Can we replace this w/ a normal swap function? Last time I did benchmarking on this

Re: svn commit: r229415 - head/lib/libvgl

2012-01-09 Thread Eitan Adler
On Mon, Jan 9, 2012 at 11:02 PM, John-Mark Gurney j...@funkthat.com wrote: Last time I did benchmarking on this ~10 years ago, it was slower to use xor instead of using assignments... I'd be shocked if the compiler didn't optimize this away to an XCHG. -- Eitan Adler

svn commit: r229415 - head/lib/libvgl

2012-01-03 Thread Pedro F. Giffuni
Author: pfg Date: Tue Jan 3 19:47:32 2012 New Revision: 229415 URL: http://svn.freebsd.org/changeset/base/229415 Log: Integrate the line drawing algorithm from the book Graphic Gems 1. http://www.graphicsgems.org/ At the time it claimed to be 3-4 times faster than the traditional