* ether_* functions
@ 2013-06-07 16:23 Rich Felker
2013-06-08 15:24 ` idunham
0 siblings, 1 reply; 2+ messages in thread
From: Rich Felker @ 2013-06-07 16:23 UTC (permalink / raw)
To: musl
Hi all,
The previous conversation about ether_aton/ntoa trailed off without
really reaching a conclusion. I'd like to get these interfaces
integrated for the next release. Does anyone have opinions on which
version we should use: the think sscanf/snprintf wrappers (which I
proposed), or the versions (by Strake) with all the logic inline that
don't depend on other heavy functions?
Rich
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ether_* functions
2013-06-07 16:23 ether_* functions Rich Felker
@ 2013-06-08 15:24 ` idunham
0 siblings, 0 replies; 2+ messages in thread
From: idunham @ 2013-06-08 15:24 UTC (permalink / raw)
To: musl
On Fri, Jun 07, 2013 at 12:23:26PM -0400, Rich Felker wrote:
> Hi all,
>
> The previous conversation about ether_aton/ntoa trailed off without
> really reaching a conclusion. I'd like to get these interfaces
> integrated for the next release. Does anyone have opinions on which
> version we should use: the think sscanf/snprintf wrappers (which I
> proposed), or the versions (by Strake) with all the logic inline that
> don't depend on other heavy functions?
I was about to say the thin wrappers because I want to avoid bloat
in libc.so and in programs that use both ether_* and *printf/sscanf,
but how much is the difference in ether_aton_r object size?
OK, let's test (Strake's last version vs Rich's scanf version,
gcc 4.4 on Debian, musl from within the last couple weeks):
/tmp$ /opt/musl/bin/musl-gcc -std=c99 -D_XOPEN_SOURCE=700 -c
ether_aton.c
/tmp$ /opt/musl/bin/musl-gcc -std=c99 -D_XOPEN_SOURCE=700 -c
ether_aton_scanf.c
/tmp$ size *.o
text data bss dec hex filename
161 0 6 167 a7 ether_aton.o
182 0 0 182 b6 ether_aton_scanf.o
With -O3:
328 0 0 328 148 ether_aton.o
142 0 0 142 8e ether_aton_scanf.o
With -Os:
101 0 0 101 65 ether_aton.o
113 0 0 113 71 ether_aton_scanf.o
Huh? I'm wondering why scanf would be _larger_ with no -O and with
-Os.
ether_ntoa is using sprintf already.
So I'll vote for Strake's version.
HTH,
Isaac Dunham
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-08 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 16:23 ether_* functions Rich Felker
2013-06-08 15:24 ` idunham
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).