MOO-cows Mailing List Archive


[ Re: Server Improvement]

------- Start of forwarded message -------
X-Intended-For: <>
Subject: Re: Server Improvement
Date: Tue, 18 Mar 1997 15:51:51 PST
x-mailer: Claris Emailer 2.0 x52, February 26, 1997
From: Jeff Watkins <>
To: "Another MOO-Cows" <>
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Precedence: bulk

Robert Jay Brown wrote:
>A function call with a signature of void (*func)(void) passes no
>parameters, and returns no results.  Consequently, it is quite fast,
>and generates a single subroutine call instruction, with no stack
>pushing or popping other than the return address itself.  The overhead
>here is a single memory cycle for call, and another single memory
>cycle for returning.

Sorry, but even a void function must push local variables onto the stack. 
On almost every processor family I've ever written assembly for (five and 
growing) a jump table (such as might be used in a switch statement) is 
better than a subroutine.

- --
Jeff Watkins
------- End of forwarded message -------

Home | Subject Index | Thread Index