mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-12 11:14:46 +01:00
Problem: new xpub option is in critical path
Solution: use unlikely to optimize for the most common case
This commit is contained in:
@@ -282,7 +282,7 @@ int zmq::xpub_t::xsend (msg_t *msg_)
|
|||||||
|
|
||||||
// For the first part of multi-part message, find the matching pipes.
|
// For the first part of multi-part message, find the matching pipes.
|
||||||
if (!_more) {
|
if (!_more) {
|
||||||
if (_manual && _last_pipe && _send_last_pipe) {
|
if (unlikely (_manual && _last_pipe && _send_last_pipe)) {
|
||||||
_subscriptions.match (static_cast<unsigned char *> (msg_->data ()),
|
_subscriptions.match (static_cast<unsigned char *> (msg_->data ()),
|
||||||
msg_->size (), mark_last_pipe_as_matching,
|
msg_->size (), mark_last_pipe_as_matching,
|
||||||
this);
|
this);
|
||||||
|
|||||||
Reference in New Issue
Block a user