<!-- MHonArc v2.4.4 -->
<!--X-Subject: RE: [MUD-Dev] Naming and Directories? -->
<!--X-From-R13: "Xnl Qneyfba" <abcNzvger.bet> -->
<!--X-Date: Thu, 18 Mar 1999 04:27:52 -0800 -->
<!--X-Message-Id: 000701be717c$7c6108d0$71015381#btb,mitre.org -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199903180221.TAA00931@ami-cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, RE: [MUD-Dev] Naming and Directories?</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:nop#mitre,org">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">
<font size="+4" color="#804040">
<strong><em>MUD-Dev<br>mailing list archive</em></strong>
</font>
<br>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00647.html">Previous</a>
| <a href="msg00649.html">Next</a>
]
Thread:
[ <a href="msg00646.html">Previous</a>
| <a href="msg00543.html">Next</a>
]
Index:
[ <A HREF="author.html#00648">Author</A>
| <A HREF="#00648">Date</A>
| <A HREF="thread.html#00648">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>RE: [MUD-Dev] Naming and Directories?</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>></LI>
<LI><em>Subject</em>: RE: [MUD-Dev] Naming and Directories?</LI>
<LI><em>From</em>: "Jay Carlson" <<A HREF="mailto:nop#mitre,org">nop#mitre,org</A>></LI>
<LI><em>Date</em>: Thu, 18 Mar 1999 15:18:28 -0500</LI>
<LI><em>Importance</em>: Normal</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
From: mud-dev-admin#kanga,nu [<A HREF="mailto:mud-dev-admin#kanga,nu]On">mailto:mud-dev-admin#kanga,nu]On</A> Behalf Of
Chris Gray
> [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...
Well, gcc doesn't. From gcc's info files, 2.7.2.1 (closest I had at hand):
`-fno-builtin'
Don't recognize builtin functions that do not begin with two
leading underscores. Currently, the functions affected include
`abort', `abs', `alloca', `cos', `exit', `fabs', `ffs', `labs',
`memcmp', `memcpy', `sin', `sqrt', `strcmp', `strcpy', and
`strlen'.
GCC normally generates special code to handle certain builtin
functions more efficiently; for instance, calls to `alloca' may
become single instructions that adjust the stack directly, and
calls to `memcpy' may become inline copy loops. The resulting
code is often both smaller and faster, but since the function
calls no longer appear as such, you cannot set a breakpoint on
those calls, nor can you change the behavior of the functions by
linking with a different library.
The `-ansi' option prevents `alloca' and `ffs' from being builtin
functions, since these functions do not have an ANSI standard
meaning.
> 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?)
Aw, it ports well enough to C. If you define them as
static INLINE get_foo() { return foo; }
you can just -DINLINE= for compilers that don't support the inline keyword
and presumably the optimizer will just inline it without prompting. The
real fun starts with gcc's static inline and extern inline declarations....
I haven't built a system for *portably* making hints like these to the
compiler. I may have to sooner or later for the MOO server, but just trying
to do the right thing with 32-bit pointers on the Alpha has been hard
enough.
Jay
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
<A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00639" HREF="msg00639.html">Re: [MUD-Dev] Naming and Directories?</A></STRONG>
<UL><LI><EM>From:</EM> Chris Gray <cg#ami-cg,GraySage.Edmonton.AB.CA></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00647.html">Re: [MUD-Dev] Mass Creation OLC Functions (idea from Elder Games)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00649.html">Re: [MUD-Dev] Mass Creation OLC Functions (idea from Elder Games)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00646.html">Re: [MUD-Dev] Naming and Directories?</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00543.html">Re: [MUD-Dev] Multiple clients (was Re: How to support 1000+ simultaneous connections)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00648"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00648"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] Naming and Directories?</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00642" HREF="msg00642.html">Re: [MUD-Dev] Naming and Directories?</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 17 Mar 1999, 21:57 GMT
</LI>
</ul>
<LI><strong><A NAME="00639" HREF="msg00639.html">Re: [MUD-Dev] Naming and Directories?</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 17 Mar 1999, 18:31 GMT
<UL>
<LI><strong><A NAME="00640" HREF="msg00640.html">Re: [MUD-Dev] Naming and Directories?</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 17 Mar 1999, 19:43 GMT
</LI>
<LI><strong><A NAME="00646" HREF="msg00646.html">Re: [MUD-Dev] Naming and Directories?</A></strong>,
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Thu 18 Mar 1999, 09:59 GMT
</LI>
<LI><strong><A NAME="00648" HREF="msg00648.html">RE: [MUD-Dev] Naming and Directories?</A></strong>,
Jay Carlson <a href="mailto:nop#mitre,org">nop#mitre,org</a>, Thu 18 Mar 1999, 12:27 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00543" HREF="msg00543.html">Re: [MUD-Dev] Multiple clients (was Re: How to support 1000+ simultaneous connections)</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 12 Mar 1999, 05:40 GMT
<LI><strong><A NAME="00532" HREF="msg00532.html">RE: [MUD-Dev] How to support 1000+ simultaneous connections, and some philosophy.</A></strong>,
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 11 Mar 1999, 15:14 GMT
<LI><strong><A NAME="00517" HREF="msg00517.html">[MUD-Dev] ADMIN: Kanga.Nu outage and other news -- please read</A></strong>,
J C Lawrence <a href="mailto:claw#varesearch,com">claw#varesearch,com</a>, Wed 10 Mar 1999, 22:38 GMT
<LI><strong><A NAME="00513" HREF="msg00513.html">[MUD-Dev] How to support 1000+ simultaneous connections, and some philosophy.</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Wed 10 Mar 1999, 05:33 GMT
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>