[nanomsg] Re: nn_recv with padding

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Tue, 13 May 2014 07:49:57 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Drew,

> It’s not a question of the *performance* impact of adjusting the
> sending implementation.  It’s a question of separation of
> responsibilities.
> 
> When the receiving side wants padding, that’s an implementation
> detail of the receiving application code, that the sender may not
> be aware of. It could be that different versions of the receiving
> application have a different preferred padding size, or that the
> preferred padding size varies from one architecture to another.
> Giving the sender knowledge about that is inappropriate coupling.

Yes. That's what zero-copy is all about. Get some performance
improvement at the expense of glueing the whole stack into a single
interconnected mess.

If your application is not performance critical, avoid zero-copy and
you'll have a happy life :)

Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTcbKFAAoJENTpVjxCNN9YJTgH/1i1wiZXcX3Kxghxq52jRETm
qDA74oO3BVMQKGA6t3jzQ1NN8WySobWXRaZwbsc8vQEmlkxwEbKF16S1cwbJjAG9
hkuHPH7o5VCQjbbQOphXL/+8dV3T99Zpwb7XBaN/qztgluIVHPzTStTRxhRp77p7
UIG6+X2K+4fQUb37/2UINvzF/P46cAp+foVVAFH8krFyRJpizResq+/poZyxzWEd
k/QJGVABpDSIKSIZFVf3vgF7s3FVl6aPB1VE5E8h9kPh0tdqKY1ehlJEzZ1mCYGE
q4f/VwhJ0+aOH3KEQZxo9Y6Kh0so3Oo6tMdE14b0ep4KHvb8wmf4WwspbfsaB84=
=lMsf
-----END PGP SIGNATURE-----

Other related posts: