2000Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Event Scheduling -->
<!--X-From-R13: [vebfyni Evybivp <fvybivpNmrfbv.sre.ue> -->
<!--X-Date: Tue, 08 Feb 2000 07:08:18 &#45;0800 -->
<!--X-Message-Id: 7e4sbkx9uf.fsf#zesoi,fer.hr -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 20000207131006.A26970#funky,monkey.org -->
<!--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:silovic#zesoi,fer.hr">
</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="msg00274.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00276.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00274.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00277.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00275">Author</A>
&nbsp;|&nbsp;<A HREF="#00275">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00275">Thread</A>
&nbsp;]

<!--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>: Miroslav Silovic &lt;<A HREF="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</A>&gt;</LI>
<LI><em>Date</em>: 08 Feb 2000 11:33:12 +0100</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>
Phillip Lenhardt &lt;philen#funky,monkey.org&gt; writes:

&gt; For those of you who have heavy-use event schedulers, what algorithms are
&gt; you using? I have implemented my event scheduler in Python using a binary
&gt; heap and it can schedule and run somewhere between 100 and 1000 events per
&gt; second without falling more than a second behind on a p2 233 machine
&gt; running openbsd. I was wondering if anyone was getting significantly
&gt; better performance from their scheduler. Examples in Python would be more
&gt; relevant to me, but anything would be appreciated.

While I'm not Python programmer, the main issue with Python is that
its datastructures are not overwritable, meaning you may end up with a
copy of your heap each time you schedule the event (it depends on
other factors, and I haven't used Python enough to be certain of
them). If Python copies the entire heap on each schedule, then you end
up with square complexity even with the heap. To find out of that is
the case, try to add and remove element from the heap 1000 times with
heap lengths of 100 and 1000 - see if the time increases 10 or 100
times.

Otherwise heap is the right data structure for this problem (but the
problem may be with Python, in which case you can only implement the
scheduler outside your Python code and glue it in).

-- 
How to eff the ineffable?



_______________________________________________
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="00277" HREF="msg00277.html">Re: [MUD-Dev] Event Scheduling</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#kanga,nu&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00274" HREF="msg00274.html">[MUD-Dev] Event Scheduling</A></STRONG>
<UL><LI><EM>From:</EM> Phillip Lenhardt &lt;philen#funky,monkey.org&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00274.html">[MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00276.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00274.html">[MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00277.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00275"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00275"><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] Couple of articles</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00291" HREF="msg00291.html">RE: [MUD-Dev] Couple of articles</A></strong>, 
Dr Richard A. Bartle <a href="mailto:richard#mud,co.uk">richard#mud,co.uk</a>, Wed 09 Feb 2000, 19:20 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00282" HREF="msg00282.html">[MUD-Dev] IO Speed Suggestions</A></strong>, 
Christopher Kohnert <a href="mailto:cjkohner#brain,uccs.edu">cjkohner#brain,uccs.edu</a>, Tue 08 Feb 2000, 19:07 GMT
<UL>
<LI><strong><A NAME="00284" HREF="msg00284.html">Re: [MUD-Dev] IO Speed Suggestions</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 08 Feb 2000, 22:13 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00274" HREF="msg00274.html">[MUD-Dev] Event Scheduling</A></strong>, 
Phillip Lenhardt <a href="mailto:philen#funky,monkey.org">philen#funky,monkey.org</a>, Mon 07 Feb 2000, 18:43 GMT
<UL>
<LI><strong><A NAME="00275" HREF="msg00275.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Tue 08 Feb 2000, 15:08 GMT
<UL>
<LI><strong><A NAME="00277" HREF="msg00277.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 08 Feb 2000, 18:19 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00276" HREF="msg00276.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Tue 08 Feb 2000, 15:08 GMT
<UL>
<LI><strong><A NAME="00281" HREF="msg00281.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Tue 08 Feb 2000, 19:07 GMT
<UL>
<LI><strong><A NAME="00730" HREF="msg00730.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
Jp Calderone <a href="mailto:exarkun#flashmail,com">exarkun#flashmail,com</a>, Mon 27 Mar 2000, 17:37 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</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>