-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RingDelayBufferTest: refactor includes and span creation #10843
RingDelayBufferTest: refactor includes and span creation #10843
Conversation
The commit removes unused include of the "util/sample.h" based on the previous changes.
This commit avoids multiple span creation from the one sample buffer (exactly SampleBuffer). Instead of that, the span is created once and stored in the variable.
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.
while you're at it, you can try to eliminate all the superfluous mixxx::spanutil::spanFromPtrLen(..., numSamples)
calls as well.
though fyi, optimizing for constructions of |
Okay, thank you for informing me. It just didn't make much sense to me to duplicate the same operation multiple times (but TBH I haven't known how span is a cheap operation). |
All multiple used spans should be deduplicated now. Although I kept the just once used span as were because it didn't make much sense to me to store them in a variable. |
This commit avoids multiple span creation from the input buffer. Instead of that, the span is created once and stored in the variable.
c501fd2
to
9044dd8
Compare
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.
lgtm. waiting for ci. thanks
The PR just improves a little bit the
RingDelayBufferTest
. The unused include is removed and the multiple span creation from oneSampleBuffer
is avoided.