This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Greg McGary <greg@mcgary.org> writes: > Greg McGary <greg@mcgary.org> writes: > > > That puts the slow-down for pure strchr in the return-NULL case at approx 1%. > > Make that 10%. I'm getting tired of answering my own emails, so let this be the last time! 8^) Here's the original data: > ./words-old 1: 0:09.77 real, 9.75 user, 0.02 sys, 99% CPU > ./words-old 1: 0:09.85 real, 9.84 user, 0.01 sys, 99% CPU > ./words-old 1: 0:09.83 real, 9.81 user, 0.02 sys, 100% CPU > ./words-new 1: 0:10.51 real, 10.50 user, 0.02 sys, 100% CPU > ./words-new 1: 0:10.50 real, 10.50 user, 0.00 sys, 99% CPU > ./words-new 1: 0:10.50 real, 10.48 user, 0.02 sys, 99% CPU > ./words-nul 1: 0:01.85 real, 1.84 user, 0.01 sys, 99% CPU > ./words-nul 1: 0:01.85 real, 1.83 user, 0.02 sys, 99% CPU > ./words-nul 1: 0:01.85 real, 1.84 user, 0.00 sys, 99% CPU Exact slowdown is (newtime-overhead)/(oldtime-overhead) = (10.5-1.85)/(9.80-1.85) = 1.08805031446540880503, or 8.8% extra runtime. Geoff, it's still a micro-efficiency IMO since real programs don't spend much time in strchr; but, if you insist, I'll rework strchr.S to eliminate the extra branch. Greg
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |