Skip to content

Improve performance of span context propagation#118

Merged
rnburn merged 33 commits into
lightstep:masterfrom
rnburn:fastprop
Sep 6, 2018
Merged

Improve performance of span context propagation#118
rnburn merged 33 commits into
lightstep:masterfrom
rnburn:fastprop

Conversation

@rnburn
Copy link
Copy Markdown
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
Copy Markdown
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