Subject: Re: CVS commit: src/lib/libc/arch/i386/string
To: Perry E. Metzger <perry@piermont.com>
From: Allen Briggs <briggs@netbsd.org>
List: current-users
Date: 02/04/2005 16:55:05
On Fri, Feb 04, 2005 at 03:06:21PM -0500, Perry E. Metzger wrote:
> In either case, being able to inline short things like zeroing
> structures is probably a win over having to call a function -- there
> is a lot of overhead in a function call, and replacing it with a
> couple of instructions in line is nice.

This is not always the case.  "a lot of overhead in a function call"
and the cost of "a couple of instructions" will vary from architecture
to architecture.  In some cases, it might be more of an overall gain
to not inline.

This isn't reason to not do it, but it might be useful to measure
the impact on different systems.  NetBSD supports some systems with
relatively small caches as well as some systems that are (ahem)
well-endowed.

-allen

-- 
                  Use NetBSD!  http://www.netbsd.org/