[Mono-dev] Patch for IPAddress.cs
Alan McGovern
alan.mcgovern at gmail.com
Tue Mar 27 08:38:23 EDT 2007
Hi,
It's quite possible that on a 64bit system this wouldn't be worthwhile, but
without a 64bit system and a 64bit mono i can't test. For ints (on a 32bit
system at least) it is faster to bitshift though.
Alan.
On 3/27/07, Gareth Pearce <tilps.kilm at gmail.com> wrote:
>
>
> Alan McGovern wrote:
> > I was messing around with the BitArray class (patch to follow) when i
> > realised that it might be faster to use unsafe code to swap the bytes.
> > So i did a test or two and it turns out that for longs it's faster to
> > use unsafe code and copy bytes around.
> >
> > This makes SwapLong ~20% faster (0.2x faster).
> >
> > Is it ok to commit?
> >
> > Alan.
> Just wondering, if this is 20% faster for longs, but not worthwhile for
> ints (I assume), is it only because you are using a 32bit targeted mono
> and not a 64bit targeted mono?
>
> --Gareth
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070327/1993cd1f/attachment.html
More information about the Mono-devel-list
mailing list