msg00289.html
2000Q1/msg00289.html · 9.1 KB
From the archive 2000Q1.zip
Download the archive « Back to the archive contents
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] Event Scheduling -->
<!--X-From-R13: Vnaf-Vraevx Egnresryqg <uufNpof.qgh.qx> -->
<!--X-Date: Wed, 09 Feb 2000 09:44:15 -0800 -->
<!--X-Message-Id: Pine.SGI.3.95.1000209102840.3133044A-100000#genome,cbs.dtu.dk -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 200002082231.QAA15008#laurel,actlab.utexas.edu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Event Scheduling</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:hhs#cbs,dtu.dk">
</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="msg00288.html">Previous</a>
| <a href="msg00290.html">Next</a>
]
Thread:
[ <a href="msg00285.html">Previous</a>
| <a href="msg00290.html">Next</a>
]
Index:
[ <A HREF="author.html#00289">Author</A>
| <A HREF="#00289">Date</A>
| <A HREF="thread.html#00289">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Event Scheduling</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] Event Scheduling</LI>
<LI><em>From</em>: Hans-Henrik Staerfeldt <<A HREF="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</A>></LI>
<LI><em>Date</em>: Wed, 9 Feb 2000 11:20:17 +0100 (MET)</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>
On Tue, 8 Feb 2000, Cynbe ru Taren wrote:
> Hans-Henrik Staerfeldt wrote:
> > I once saw a lecture covering an eventqueue algorithm running O(log(log(n)))
> > for insertions and O(1) for deletions. My guess would be that it is the
> > implementation of the actual events that will take the time, even if you
> > use a O(log(n)) time event queue, or are my notions wrong?
>
> I would take that O(log(log(n)) with a grain of salt: It means that
> inserting and deleting N events gives you an O(log(log(n)) sort,
> right?
O(n log(log(n))), but i guess that was what you meant :-)
> If it were that easy, quicksort would be history. :)
It _is_ right :-). Furthermore, i saw the eventqueue run as a sorter
against quicksort, and the speedup _is_ there (for n>500 and random
values, or so). I'll try and go dig up the reference.
...digging... Whoha! here's the article, and it even has C source in it,
and some performance measures. BTW. this was constructed with Dijkstra's
shortest path in mind, so i guess you could use it there as well (where you
would expect large n).
<A HREF="http://www.diku.dk/users/mthorup/PAPERS/pragma.ps.gz">http://www.diku.dk/users/mthorup/PAPERS/pragma.ps.gz</A>
Other referenced papers, explains the proof of O(log log n) priority queue,
also implements a randomized O(log log n) version...
<A HREF="http://www.diku.dk/users/mthorup/PAPERS/combo.ps.gz">http://www.diku.dk/users/mthorup/PAPERS/combo.ps.gz</A>
<A HREF="ftp://dimacs.rutgers.edu/pub/dimacs/TechnicalReports/TechReports/1996/96-14.ps.gz">ftp://dimacs.rutgers.edu/pub/dimacs/TechnicalReports/TechReports/1996/96-14.ps.gz</A>
Check out <A HREF="http://www.diku.dk/users/mthorup/PAPERS/papers.html">http://www.diku.dk/users/mthorup/PAPERS/papers.html</A> for
the algorithmics nerds. Many of the articles are on graph problems
that could relate to MUD's (connectivity, or shortest path).
> Usually it turns out there's a bit of fudging, pretending that
> radix sort is constant time, or some such, involved in such
> expressions, at least in my experience.
>
> Theoreticians like to cook up fanciful priority queues on a regular
> basis: They typically aren't anything for practicing programmers
> to get overly excited about. E.g., look up the "Calendar Queue",
> which promises both O(1) insert and O(1) delete times. It's basically
> a rolling hashtable with the slots corresponding to times, and the
> assumption that they hash uniformly enough to give the claimed
> O(1), no doubt with the infamous "probability 1".
Randomized algorithms are usually also eficient in practice. This however
is deterministic.
> It may be apropos to point out yet again that it is almost always
> a mistake to start optimizing this sort of stuff heavily before
> you in fact have a demonstrated performance problem on live data,
> and have traced it to the datastructure/algorithm in question?
I totally concur. My guess is that it would be everything else that stole your
time, unless you have alot of events that are very fast to execute, i would go
for a simple heap, worry about the event queue, only if my profiler said i was
spending most time there.
Hans Henrik Stærfeldt | bombman#diku,dk | work: hhs#cbs,dtu.dk |
address: |___ +45 40383492 __|__ +45 45252425 __|
Dybendalsvej 74 2. th, | Scientific programmer at Center for Biological |
2720 Vanløse, Danmark. | Sequence Analysis, Technical University of Denmark|
_______________________________________________
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="00285" HREF="msg00285.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
<UL><LI><EM>From:</EM> Cynbe ru Taren <cynbe#muq,org></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00288.html">[MUD-Dev] Couple of articles</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00290.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00285.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00290.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00289"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00289"><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] Event Scheduling</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00294" HREF="msg00294.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 10 Feb 2000, 18:09 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00286" HREF="msg00286.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 09 Feb 2000, 04:38 GMT
<UL>
<LI><strong><A NAME="00287" HREF="msg00287.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 09 Feb 2000, 04:53 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00285" HREF="msg00285.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Wed 09 Feb 2000, 04:38 GMT
<UL>
<LI><strong><A NAME="00289" HREF="msg00289.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Wed 09 Feb 2000, 17:44 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00290" HREF="msg00290.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Wed 09 Feb 2000, 19:02 GMT
<UL>
<LI><strong><A NAME="00295" HREF="msg00295.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Sun 13 Feb 2000, 00:10 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00302" HREF="msg00302.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Sun 13 Feb 2000, 07:06 GMT
<UL>
<LI><strong><A NAME="00307" HREF="msg00307.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Mon 14 Feb 2000, 17:21 GMT
</LI>
</UL>
</LI>
</ul>
</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>