[Mono-dev] Patch for IPAddress.cs
Gareth Pearce
tilps.kilm at gmail.com
Tue Mar 27 04:09:48 EDT 2007
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
More information about the Mono-devel-list
mailing list