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 2/2] getopt.c: use fputs()/fputc() instead of fprintf() to, save code space


W dniu 2013-11-09 04:24, Craig Howland pisze:
I am curious:  what were your the overall savings?

In case of my current project, which does use some formatted output, but only with integer versions of printf(), the code with original getopt() uses 151kB, while getopt() with fputs()/fputc() uses 134kB, so 17kB less. I could also try to check how much is pulled into an empty project when adding getopt(), so that would show the absolute size difference.

The change of RAM usage is really hard to measure, but if you'd really like to know that, I could try to check that too. I suspect it would be a couple hundred bytes of stack.

Regards,
FCh


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