Alan Coopersmith <[EMAIL PROTECTED]> wrote: > Roland Mainz wrote: > > Umpf. See my original posting. My intention was to improve performance > > and usuability. |snprintf()| would make it slower. MUCH slower. > > Is snprintf() really the performance bottleneck in your application?
I currently only know of one single application where sprintf() would be (and in former times really was) a performance bottle neck: star in a mode that creates POSIX.1-2001 extension headers. My solution that made star in this mode even faster that GNU tar in historical tar mode was to use unrolled macros rather than using strcatl(). > > And: snprintf() may be evil - see Mozilla.org Bug 332006 > > (https://bugzilla.mozilla.org/show_bug.cgi?id=332006 - "Avoid raw calls > > to snprintf"). > > What broken OS doesn't guarantee null termination on snprintf()? > Solaris and the Single Unix Spec v3 both do. Thank you for verifying this, I was confuced from the message. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED] (uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ opensolaris-discuss mailing list [email protected]
