[Mono-devel-list] Patch for ToUpper/ToLower
ClassDevelopment at A-SoftTech.com
Sat Apr 24 18:59:33 EDT 2004
OK - most parts are commited. Did not change the Char.ToLower and ToUpper
yet, because I fear this would break a lot of code (as I already wrote)
> > I looked at their implementation and now I understand why my
> > functions are much faster ;)
> > However I could not find any special cases that glib handles that we
> do not
> > (for the invariant case). If you find any, please write which!
> > So it's all about speed...
> Perhaps the extra stuff is for non-invariant locales.
> > No - you do not have to use unmanaged code for that. However you still
> > to Allocate a string, which unfortunatelly needs an internalcall.
> > (Finding a way to not need the internalcall for constructing a string
> > InternalAllocateString would really give the string class a speed
> You're right. I didn't see that we had access to the 1st character like
> I've attached the necessary changes to Char.cs, icall.c, and locales.c.
> They reflect your changes in String.cs. My only suggestion would be to
> compare the culture.LCID to the Invariant ID 0x007F (as I did in
> Char.cs) instead of CultureInfo.InvariantCulture.LCID. It might get you
> a little more of that speed you're after. :)
More information about the Mono-devel-list