Subject: Re: Nuking mbuf macros
To: None <tech-kern@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 03/23/2004 01:53:38
On Mon, Mar 22, 2004 at 10:44:40PM -0800, Matt Thomas wrote:
> 
> Translating them to inline functions wouldn't bother me much.
> On some architectures the call overhead can be quite high (VAX).
> 
> But I want to see performance numbers for a number of architectures
> including some of the older ones like m68k, vax, alpha.

Of course, if we make them functions, we can easily select whether
they're inline or not per-port or even per-kernel-configuration,
using the usual technique of preprocessor magic to choose whether
the functions are defined, inline, in the header file, or just prototyped,
building a real version of the function either way (which will simply
not be used if the inline one is turned on) or alternately moving the
real one into its own .c file so config can cause it to not be compiled
at all.

Ross had some pretty unhappy things to say about the performance impact
of extensive use of macros and inline functions on Alpha, so I'd kinda
defer to his expertise and expect the non-inline version to win there.

-- 
 Thor Lancelot Simon	                                      tls@rek.tjls.com
   But as he knew no bad language, he had called him all the names of common
 objects that he could think of, and had screamed: "You lamp!  You towel!  You
 plate!" and so on.              --Sigmund Freud