svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net

Gleb Smirnoff glebius at FreeBSD.org
Tue Jun 3 08:59:45 UTC 2014


On Mon, Jun 02, 2014 at 12:27:47PM -0700, Adrian Chadd wrote:
A> >> > .. and actually, bikeshedding for a moment, would we be able to move a
A> >> > lot of these accessor methods over to inlines? Would that break the
A> >> > Juniper way of doing things?
A> >>
A> >> That would definitely break Juniper as it doesn't give a stable
A> >> ABI.
A> >>
A> >> I've suggested an approach that allows for both, but it was deemed
A> >> unnecessary. The argument being that the function call overhead is
A> >> negligible.
A> >>
A> >> We can always revisit that decision if needed...
A> >>
A> >
A> > In my experience, function call overhead is anything but minimal,
A> > especially on ARM platforms.
A> 
A> Same on MIPS.

And same on amd64. While benchmarking the counter(9), I even encountered
artifacts when function call was faster than inline.

Of course, function call shouldn't be via a pointer.

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list