Re: Minor Comments on Gmake Internals

Paul Smith <[email protected]> Sat, 18 Dec 2021 14:02:15 -0500
Newsgroups gmane.comp.gnu.make.devel
Organization GNU's Not UNIX!
Message-ID <[email protected]>
On Sat, 2021-12-18 at 08:08 -0800, Jon Forrest wrote:
> We're talking small potatoes here, but from the point of view of
> overhead, putting a check for a 0 length before each call would
> require fewer resources than making the function call and doing the
> call to memcpy with a length of 0. If you're talking style that's
> different.

Certainly it's fewer cycles to not call the function but it adds to the
code complexity so I'm not in favor unless performance testing can show
it matters in some situation(s).

Most compilers use intrinsics for memcpy() anyway so that specific
element is probably not measurable.