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

fix: in_span performance #1514

Merged
merged 1 commit into from
Aug 15, 2023
Merged

fix: in_span performance #1514

merged 1 commit into from
Aug 15, 2023

Conversation

robertlaurin
Copy link
Contributor

@robertlaurin robertlaurin commented Aug 15, 2023

Follow up fix for #1492

ruby proc-call-vs-yield.rb
Warming up --------------------------------------
          block.call     1.141M i/100ms
       block + yield     1.202M i/100ms
        unused block     1.495M i/100ms
               yield     1.389M i/100ms
Calculating -------------------------------------
          block.call     11.485M (± 1.4%) i/s -     58.175M in   5.066280s
       block + yield     11.910M (± 1.6%) i/s -     60.089M in   5.046587s
        unused block     14.945M (± 5.4%) i/s -     74.725M in   5.019902s
               yield     14.068M (± 1.0%) i/s -     70.858M in   5.037486s

Comparison:
        unused block: 14945101.0 i/s
               yield: 14067574.6 i/s - same-ish: difference falls within error
       block + yield: 11910103.8 i/s - 1.25x  slower
          block.call: 11485071.3 i/s - 1.30x  slower

In the previous PR we went from block.call to block + yield but I intended for us to go to yield

@robertlaurin robertlaurin merged commit e654d73 into main Aug 15, 2023
45 checks passed
@robertlaurin robertlaurin deleted the fix-in-span-perf branch August 15, 2023 20:11
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