Threading libsmbclient - a proposal.

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Apr 4 08:16:24 GMT 2009


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 that
> are executed frequently. Function calls can be expensive. It's probably much
> more efficient to say "if (func_ptr != NULL) (*func_ptr)(params);" than to
> call a dummy function via func_ptr. That could all be hidden behind a macro,
> 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
netbench.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090404/deed81fd/attachment.bin


More information about the samba-technical mailing list