Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of span context propagation #118

Merged
merged 33 commits into from
Sep 6, 2018

Conversation

rnburn
Copy link
Contributor

@rnburn rnburn commented Sep 5, 2018

Replaces the stringstream-based hex-integer conversion code with faster alternatives. Here are benchmarks from before and after showing significant performance improvements for multikey injection and extraction.

before:

-----------------------------------------------------------------------------
Benchmark                                      Time           CPU Iterations
-----------------------------------------------------------------------------
BM_SpanContextMultikeyInjection             1165 ns       1165 ns     601641
BM_SpanContextMultikeyExtraction            1056 ns       1056 ns     657310

after:

-----------------------------------------------------------------------------
Benchmark                                      Time           CPU Iterations
-----------------------------------------------------------------------------
BM_SpanContextMultikeyInjection               76 ns         76 ns    9649126
BM_SpanContextMultikeyExtraction             288 ns        288 ns    2431295

@rnburn rnburn requested a review from jmacd September 5, 2018 18:43
Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rnburn rnburn merged commit 32bee7b into lightstep:master Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants