msg00656.html

1999Q1/msg00656.html · 8.3 KB

From the archive 1999Q1.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Naming and Directories? -->
<!--X-From-R13: [nex Uevggre <znexNreqbf.Egnasbeq.SRG> -->
<!--X-Date: Thu, 18 Mar 1999 10:58:47 &#45;0800 -->
<!--X-Message-Id: 199903190249.SAA30725#erdos,Stanford.EDU -->
<!--X-Content-Type: text -->
<!--X-Reference: 36F19DEF.CB345660#ifi,uio.no -->
<!--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:mark#erdos,Stanford.EDU">
</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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00655.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00657.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00652.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00662.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00656">Author</A>
&nbsp;|&nbsp;<A HREF="#00656">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00656">Thread</A>
&nbsp;]

<!--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>: Mark Gritter &lt;<A HREF="mailto:mark#erdos,Stanford.EDU">mark#erdos,Stanford.EDU</A>&gt;</LI>
<LI><em>Date</em>: Thu, 18 Mar 1999 18:49:47 -0800 (PST)</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>
Ola Fosheim =?iso-8859-1?Q?Gr=F8stad?= writes:
&gt; 
&gt; Mark Gritter wrote:
&gt; &gt; Although a trie could easily use 10x or more memory than a binary tree,
&gt; &gt; the number of cache lines you're accessing is likely to be much smaller
&gt; &gt; during a lookup, and that's generally a big win.  (Assuming you have enough
&gt; &gt; memory so you don't have to page, of course.)
&gt; 
&gt; Uhm... But a hashtable would only access like... 3-5 cachelines?  (I
&gt; don't think trees and tries qualifies as random-access structures
&gt; either)  The benefit of the binary tree is that it is efficient to
&gt; traverse... So we agree, we need to know what the datastructure is going
&gt; to be used for. For instance, if you want to display a sorted "all
&gt; players" list then a binary tree (or a balancing variant) would do ok.
&gt; *shrug*
&gt; 

True, hash tables are generally good.  The main difference is, as you say,
whether you're interested in just exact lookups, or also sorted lists,
prefixes, etc.

&lt;GEEK mode='os/architecture'&gt;
There's actually a solution for handling "prefix" lookups that gets used
(well, discussed, anyway) in handling TLB misses.  Say you have various page 
sizes, and aren't sure which size to use when looking in your inverted page 
table.  Just duplicate the entry for each of the possible prefixes.  So in 
terms of our discussion, add 'Mark', 'Mar', 'Ma', and 'M' to the hash table, 
stopping when there's a conflict with another name.
&lt;/GEEK&gt;

&gt; &gt; Binary-tree cache behavior could be improved significantly by limiting the 
&gt; &gt; key length and adding some space overhead to the node:
&gt; 
&gt; &gt; struct node {
&gt; &gt;  char key[24];
&gt; &gt;  struct node *left, *right;
&gt; &gt; };
&gt; 
&gt; sizeof(struct node) == 36... Maybe it would be better if one clustered
&gt; those variables whose bytes are most likely to be accessed? ;^)
&gt; 

Doh!  I was aiming for sizeof(struct node) == 32, but forgot the object
pointer...  plus, you'd have to throw it out and start over for a new
pointer size.  Your idea seems better, with those considerations.

Mark Gritter
mgritter#cs,stanford.edu


_______________________________________________
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>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00662" HREF="msg00662.html">Re: [MUD-Dev] Naming and Directories?</A></strong>
<ul compact><li><em>From:</em> Ola Fosheim Grøstad &lt;olag#ifi,uio.no&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00652" HREF="msg00652.html">Re: [MUD-Dev] Naming and Directories?</A></STRONG>
<UL><LI><EM>From:</EM> Ola Fosheim Grøstad &lt;olag#ifi,uio.no&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00655.html">Re: [MUD-Dev] Mass Creation OLC Functions (idea from Elder Games)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00657.html">Re: [MUD-Dev] Mass Creation OLC Functions (idea from Elder  Games)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00652.html">Re: [MUD-Dev] Naming and Directories?</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00662.html">Re: [MUD-Dev] Naming and Directories?</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00656"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00656"><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>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00626" HREF="msg00626.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Wed 17 Mar 1999, 02:48 GMT
</LI>
<LI><strong><A NAME="00628" HREF="msg00628.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Wed 17 Mar 1999, 08:43 GMT
<UL>
<LI><strong><A NAME="00638" HREF="msg00638.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Mark Gritter <a href="mailto:mark#erdos,Stanford.EDU">mark#erdos,Stanford.EDU</a>, Wed 17 Mar 1999, 18:03 GMT
<UL>
<LI><strong><A NAME="00652" HREF="msg00652.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Thu 18 Mar 1999, 17:54 GMT
<UL>
<LI><strong><A NAME="00656" HREF="msg00656.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Mark Gritter <a href="mailto:mark#erdos,Stanford.EDU">mark#erdos,Stanford.EDU</a>, Thu 18 Mar 1999, 18:58 GMT
<LI><strong><A NAME="00662" HREF="msg00662.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Sat 20 Mar 1999, 16:15 GMT
</LI>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00644" HREF="msg00644.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Thu 18 Mar 1999, 07:44 GMT
<UL>
<LI><strong><A NAME="00653" HREF="msg00653.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Thu 18 Mar 1999, 17:54 GMT
<UL>
<LI><strong><A NAME="00660" HREF="msg00660.html">Re: [MUD-Dev] Naming and Directories?</A></strong>, 
J C Lawrence <a href="mailto:claw#varesearch,com">claw#varesearch,com</a>, Fri 19 Mar 1999, 11:38 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>

Site Stats

Snippets: 1791
Codebases: 571