[Mono-dev] Patch for IPAddress.cs

Alan McGovern alan.mcgovern at gmail.com
Sun Mar 25 10:09:54 EDT 2007

Ok, so this should be the final patch needed, i don't think i can possibly
get it any faster.

I removed an excess bitshift operation from each call and made things nicer.
This version is a few % faster than the previous patch. Not a huge
difference, but still a difference.

Let me know if it's good to commit.


On 3/25/07, Miguel de Icaza <miguel at novell.com> wrote:
> Hello,
> > x86 actually has an instruction whose sole purpose is to invert the byte
> > order of a 32-bit value. Look up BSWAP. It requires at least a 486,
> though.
> > Does mono otherwise run on 386 CPUs presently? If it is okay to exclude
> 386
> > systems (or they can be detected on-the-fly and given the alternative 3
> > instructions), then perhaps it would be possible to do something like
> > marking it as an icall and having the JIT recognize that method and
> inline
> > it as just a BSWAP.
> Well, we can detect if the CPU is a 486 or better, and if so use the
> instruction instead of our own code.
> This would come in handy for BitConverter and DataConverter as well.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070325/7f7e417f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipaddress.patch
Type: text/x-patch
Size: 1833 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070325/7f7e417f/attachment.bin 

More information about the Mono-devel-list mailing list