Skip to content

c++ performance vs c performance #358

@wjbbupt

Description

@wjbbupt

Experiments have found that the performance of c++ is slower than that of c by 2-3 times. Through the flame graph, we can see that the sequence on the pub side is replaced by cdr, which consumes a lot. On the sub side, deserialization is faster and take is faster, so I want to analyze it together. The following is flame graph。
c:pub:
image

c:sub:
image

c++ pub
image
c++:sub
image
What I want to confirm is that I suspect that the reason for the slow performance of c++ is:

  1. Slow serialization on the pub side leads to slow sending;
  2. Slow deserialization at the sub end leads to slow processing
  3. The receiving end checks whether the take thread and deserialization are not in the same thread, whether it is the influence between threads;
  4. When take is received, there is a lock mechanism and a limit of max=100 samples
    The above are some of my doubts, and I want to discuss and study them with you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions