svn commit: r229415 - head/lib/libvgl

Pedro Giffuni pfg at freebsd.org
Tue Jan 10 04:46:34 UTC 2012


Hi John;

--- Lun 9/1/12, John-Mark Gurney <jmg at funkthat.com> ha scritto:
...
> Pedro F. Giffuni wrote this message
> on Tue, Jan 03, 2012 at 19:47 +0000:
> > +#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...
> 

I doubt it's worth it, the swapping is not critical here and
doing a swap saves a temporary variable (not that they are
expensive either).

cheers,

Pedro.


> -- 
>   John-Mark Gurney   
>            
> Voice: +1 415 225 5579
> 
>      "All that I will do, has been
> done, All that I have, has not."
> 


More information about the svn-src-all mailing list