[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

9837: Re: [MUD-Dev] Naming and Directories?

[Full Header] [Plain Text]
From: Chris Gray <cg@ami-cg.GraySage.Edmonton.AB.CA>
Newsgroups: nu.kanga.list.mud-dev
Date: Wed, 17 Mar 1999 19:21:50 -0700
Organization: Kanga.Nu
[Jo Dillon:]

 >  If it's that optimised might it not be defined in the header file,
 >giving the compiler the source? I mean, if I was writing a highly
 >optimised strcmp I wouldn't overlook the overhead involved in a function
 >call...

I don't know if has been (or can be) done with strcmp in particular,
but I've heard of optimized versions of memcpy that have quite long
sources, sometimes written in assembler. They attempt to do things
whole words at a time instead of a character at a time, have special
cases for short operations, etc. I may be a few years out of date on
this info, however. Personally, I don't recall seeing any functions
given in system header files like that, other than things like
'FD_SET', etc. Keep in mind that the practice of having short accessor
routines be 'inline' is a C++ thing, and doesn't port to ANSI C (I think -
I know gcc supports 'inline', but is it part of ANSI C?)

--
Don't design inefficiency in - it'll happen in the implementation.

Chris Gray     cg@ami-cg.GraySage.Edmonton.AB.CA
               http://www.GraySage.Edmonton.AB.CA/cg/


_______________________________________________
MUD-Dev maillist  -  MUD-Dev@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev