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: [PATCH] Reduce RAM usage of floating point conversion functions


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!!


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