This is the mail archive of the
mailing list for the newlib project.
Re: [PATCH] Reduce RAM usage of floating point conversion functions
- From: Freddie Chopin <freddie_chopin at op dot pl>
- To: newlib at sourceware dot org
- Date: Mon, 10 Jun 2013 09:43:11 +0200
- Subject: Re: [PATCH] Reduce RAM usage of floating point conversion functions
- References: <BLU0-SMTP19283F8FCD7F4905FE47D85F99B0 at phx dot gbl>
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?