MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
[SERVER] Wish list--tick charging for built-ins
-
Date: Sun, 22 Sep 1996 14:03:02 PDT
-
From: Christopher Unkel <cunkel@us.itd.umich.edu>
-
Content-Type: TEXT/PLAIN; charset=US-ASCII
It would be nice if there were provisions for built-in functions to charge
a variable number of ticks to the executing task. Why? Well, it's nice
to implement some of the most computationally intensive functions as
server builtins because they're faster than byte-code interpreted code.
At the same time, it doesn't make sense that, for example, a call to
server_version() costs the same number of ticks as say, a call to a
built-in list_assoc() on a 100-element list that doesn't find a match.
Relying on tasks running out of seconds is bad; 3 seconds is an awful
large amount of the server's time for one task, really, and plus
preventing a task time-out is much harder than preventing a task tick-out
(from the programmer's point of view.) It's true that it's more difficult
to know where all your ticks are going if a built-in function can use an
unknown number, but I think on balance this is a win for programmers.
Implementing this should be relatively simple -- just add
ticks_remaining() and charge_ticks() functions to the interface on
execute.h. Only built-ins that want to charge ticks above the normal
number for a built-in need to use the functions.
Comments, anyone?
--Chris cunkel@engin.umich.edu
ResComp Network Support Technician, Bursley Hall
"Invisibility is in the eye of the beholder."
Home Page: http://www-personal.engin.umich.edu/~cunkel/
Follow-Ups:
Home |
Subject Index |
Thread Index