Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: small optimization for ptr encoding
Signed-off-by: Xinze Chi <xinze@xsky.com>
- Loading branch information
2c8a175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this supposed to help with performance? Prevoius code just shared the bufferptr and new code copies (except data), which is both slower and adds work to already overloaded memory allocator.
The above code shows the following on Xeon E5-2420 v2 @ 2.20GHz:
In other words, your "optimization" slows down bufferlist encode by at least around 2us per call.