[PATCH/RFA]: Optimize wctomb/mbtowc functions for speed

Corinna Vinschen vinschen@redhat.com
Wed Nov 18 17:51:00 GMT 2009


On Nov 17 18:31, Jeff Johnston wrote:
> On 17/11/09 04:38 AM, Corinna Vinschen wrote:
> >Here's the patch which calls the __mbtowc and __wctomb functions
> >directly.  It also leaves out the PREFER_SIZE_OVER_SPEED improvement, so
> >I guess it should be ok to go in.  However, I would really like yoy to
> >reconsider the PREFER_SIZE_OVER_SPEED change.  It really makes a big
> >difference from the application POV.
> >
> 
> Ok, I am convinced.  Feel free to check in the modified patch.

Thanks!  Patch applied.  I changed

  #ifdef PREFER_SIZE_OVER_SPEED

to

  #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)

as in other cases, so -Os takes the long path via the _r function, too.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat



More information about the Newlib mailing list