[PATCH] Reduce RAM usage of floating point conversion functions

Freddie Chopin freddie_chopin@op.pl
Mon Jun 10 07:43:00 GMT 2013


W dniu 2013-06-09 17:14, Federico Terraneo pisze:
> - - gethex() and hexnan(), which are use by both strtod() and _ldtoa_r()
>    use a lookup table to test if a char is an hex digit, requiring
>    256 bytes of RAM. The patch replaces this table with a function.
>    As this may result in a performance penalty, this change is only
>    enabled if PREFER_SIZE_OVER_SPEED, __OPTIMIZE_SIZE__ or _SMALL_HEXDIG
>    is defined. The last macro was introduced to be able to selectively
>    enable this change.

Couldn't this lookup table be made "static const" instead, removing the 
alleged speed penalty, but keeping the reduced RAM requirement?

4\/3!!



More information about the Newlib mailing list