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

perf(span): compare Spans as single u64s #8300

Draft
wants to merge 1 commit into
base: 01-03-perf_span_hash_span_as_a_single_u64_
Choose a base branch
from

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Jan 6, 2025

#8298 made Span aligned on 8 on 64-bit platforms. Utilize this property to compare Spans as a single u64 instead of 2 x u32s. This removes some really weird assembly which compiler otherwise produces, using expensive SIMD operations for a simple comparison: https://godbolt.org/z/P4Wvf7nxT

Note: This only affects comparing &Spans. Makes no difference when comparing owned Spans.

@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label Jan 6, 2025
Copy link
Contributor Author

overlookmotel commented Jan 6, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codspeed-hq bot commented Jan 6, 2025

CodSpeed Performance Report

Merging #8300 will not alter performance

Comparing 01-04-perf_span_compare_span_s_as_single_u64_s (9235279) with 01-03-perf_span_hash_span_as_a_single_u64_ (4680154)

Summary

✅ 29 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 01-03-perf_span_hash_span_as_a_single_u64_ branch from 9456df6 to 4680154 Compare January 6, 2025 17:21
@overlookmotel overlookmotel force-pushed the 01-04-perf_span_compare_span_s_as_single_u64_s branch from b46d0a8 to 9235279 Compare January 6, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-performance Category - Solution not expected to change functional behavior, only performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant