Threading libsmbclient - a proposal.
derrell.lipman at unwireduniverse.com
Sat Apr 4 12:21:56 GMT 2009
On Sat, Apr 4, 2009 at 4:16 AM, Volker Lendecke
<Volker.Lendecke at sernet.de>wrote:
> On Fri, Apr 03, 2009 at 12:51:05PM -0400, Derrell Lipman wrote:
> > And we probably want to avoid even that, particularly in areas of code
> > are executed frequently. Function calls can be expensive. It's probably
> > more efficient to say "if (func_ptr != NULL) (*func_ptr)(params);" than
> > call a dummy function via func_ptr. That could all be hidden behind a
> > though, so the code isn't cluttered by it.
> Are function calls really expensive these days? With all the
> levels of caches these days and just silly fast CPUs, isn't
> it more important to be cache friendly? When I added the
> "unlikely" to the DEBUG macros, it actually made a
> difference when looking at our cache footprint with
> cachegrind. And that made a few percent difference for
You may be right. I'm old. :-) Some habits instilled early in my career may
no longer be so necessary and I haven't researched it recently.
More information about the samba-technical