From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 27225 invoked from network); 12 Jul 1998 19:02:13 -0000 Received: from post-12.mail.demon.net (HELO post.mail.demon.net) (194.217.242.41) by mail2.redhat.com with SMTP; 12 Jul 1998 19:02:13 -0000 Received: from (tardis.home.dave) [194.222.210.232] by post.mail.demon.net with smtp (Exim 1.82 #2) id 0yvRNp-0005fp-00; Sun, 12 Jul 1998 19:02:02 +0000 Date: Sun, 12 Jul 1998 19:56:33 +0100 (BST) From: Dave Gilbert X-Sender: gilbertd@tardis.home.dave To: axp-list@redhat.com Subject: Function call oddity Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII While trying to really optimise a piece of my code I noticed the following oddity; build a loop which calls a function many times, make sure the compiler can't inline the function by placing it after the point of calling. If the function has no parameters and no results then this runs faster than all other cases (expected). However if the routine has one parameter and a result then it runs faster than a similar routine without a parameter!! This is really unexpected to me; by the look of the code it must be to do with allocation of space on the stack at a guess - wierd!! parameter no param result 6 6.79 no res 5.28 4.53 Dave -------------------------------------------------------------------- / Dr. David Alan Gilbert | Running Linux on Alpha & ARM \ \ gro.gilbert @ treblig.org | ------- Happy in hex ------- / \____________________________|___ http://www.treblig.demon.co.uk __/