This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wcstod/wcstof


On Feb  6 11:29, Corinna Vinschen wrote:
> Hi,
> 
> there are two possible ways to implement wcstod/wcstof:
> 
> o Convert the wchar string to multibyte and call strtod.
> 
>   + Very tiny code.  Good for embedded targets.
>   - The endptr position is not reliable.
>   - Slower than strtod.
> 
> o Copy the entire code from strtod.c and just 

...convert all chars to wchars.

> 
>   + As fast as strtod.
>   + Reliable endptr.
>   - Much bigger code.
> 
> Which solution is preferrable for newlib?  Maybe both, dependent on
> PREFER_SIZE_OVER_SPEED/__OPTIMIZE_SIZE__?


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]