This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 2/2] getopt.c: use fputs()/fputc() instead of fprintf() to, save code space
- From: Craig Howland <howland at LGSInnovations dot com>
- To: newlib at sourceware dot org
- Date: Fri, 08 Nov 2013 22:24:04 -0500
- Subject: Re: [PATCH 2/2] getopt.c: use fputs()/fputc() instead of fprintf() to, save code space
- Authentication-results: sourceware.org; auth=none
- References: <527D3E68 dot 1020600 at op dot pl>
On 11/08/2013 02:41 PM, Freddie Chopin wrote:
This is another approach aiming to reduce code and RAM usage of getopt().
Using fputs()/fputc() makes the function about 200 bytes bigger than when
using f[i]printf() (on ARMv7-M, Cortex-M3), but now getopt() and family have
zero dependency on heavy-weight formatting functions.
Regards,
FCh
I reviewed the code changes, and they look good.
I am curious: what were your the overall savings?
Craig