This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: strtoul etc.


Gabriel Dos_Reis <Gabriel.Dos_Reis@sophia.inria.fr> writes:

> I should confess that I'd favor the way Nathan is describing.

Sorry to say this, but this really misses the contact to reality.
First, with tons of special inline functions the compilation times go
up significantly.  Second, with everything inlined you can get worse
execution times than with a function call to a specialized function.
Modern architectures are very sensitive to icache density.  This kind
of C++ programming completely destroys it.  On the other hand a
function call is today predicted correctly and executed alwmost
without penalty and the called function is used in more than one place
and therefore can have more probable an "hot" icache.

In addition to this for embedded programming program size matters.
Therefore the strtol solution *must* stay in anyway.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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