MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

[jwatkins@futurepress.com: Re: Server Improvement]



------- Start of forwarded message -------
Return-Path: moo-cows-errors@parc.xerox.com
X-Intended-For: <moo-cows@parc.xerox.com>
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 <jwatkins@futurepress.com>
To: "Another MOO-Cows" <moo-cows@parc.xerox.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Sender: MOO-Cows-Errors@parc.xerox.com
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
http://www.FuturePress.com/People/jwatkins/
mailto:jwatkins@FuturePress.com
------- End of forwarded message -------


Home | Subject Index | Thread Index