wcstod/wcstof
Corinna Vinschen
vinschen@redhat.com
Fri Feb 6 11:30:00 GMT 2009
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
More information about the Newlib
mailing list