J
John Reye
Hi,
recently I learned that various "standard C library" functions have
deficiencies in terms of high performance.
Examples include the return values of fgets(), strcpy(), strcat()
(thanks Eric Sosman for mentioning the last 2)
Example: char * strcat ( char * destination, const char *
source );
Return Value: destination is returned.
How useless is that! I already know the distination, in the first
place.
Why not return a pointer to the end of the concatenated string, or the
size of the string. This would cost the library no extra performance
cost whatsoever!
Are these deficiencies _only_ string-related?
Is there no good library which I can use for optimal computing?
Because if I use the "standard C library" I'll end up _not_ using many
of it's routines.
Where is a library, that is done right??
Would this library only be a string-handling library, or buffer-
handling library? Or are there other parts of the "standard C library"
that are also deficient.
Surely there must be a good library somewhere, or do all C programmers
really carry their own routines with them?
Thanks.
recently I learned that various "standard C library" functions have
deficiencies in terms of high performance.
Examples include the return values of fgets(), strcpy(), strcat()
(thanks Eric Sosman for mentioning the last 2)
Example: char * strcat ( char * destination, const char *
source );
Return Value: destination is returned.
How useless is that! I already know the distination, in the first
place.
Why not return a pointer to the end of the concatenated string, or the
size of the string. This would cost the library no extra performance
cost whatsoever!
Are these deficiencies _only_ string-related?
Is there no good library which I can use for optimal computing?
Because if I use the "standard C library" I'll end up _not_ using many
of it's routines.
Where is a library, that is done right??
Would this library only be a string-handling library, or buffer-
handling library? Or are there other parts of the "standard C library"
that are also deficient.
Surely there must be a good library somewhere, or do all C programmers
really carry their own routines with them?
Thanks.