>>>>> Pekka Savola writes:
Pekka> --- Worse, the concept of savestr() looks broken. The code
Pekka> comment says it is there to "reduce malloc() overhead incurred
Pekka> by strdup()". That's a horrendous case of a programmer
Pekka> inventing a problem. savestr() is only used a few times.
If we were to accept the argument that there is a real performance
gain (which really needs a proof across platforms), then we are on the
path to replace arbitrary libc functions in the future where one can
come up with a reimplementation that is faster (at least on one
platform).
It is IMHO the job of the libc coders to make strdup() and everything
else fast (and I think some libc's do real magic to achieve this). We
should not waste any time trying to be better.
/js
--
Juergen Schoenwaelder Technical University Braunschweig
<[EMAIL PROTECTED]> Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289 Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax: +49 531 391 5936 <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe