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

Consumer: use a bitset instead of a set for supported payload types #919

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

jmillan
Copy link
Member

@jmillan jmillan commented Sep 30, 2022

This is way more performant.

  • Before the change, set.find() could take as much as half of the CPU time taken by RtpStreamSend::ReceivePacket().
  • After the change, bitset[] CPU time is negligible.

Extra: It takes less space than the set.

This is way more performant.
* Before the change, set.find() could take as much as half of the CPU time
  taken by RtpStreamSend::ReceivePacket().
* After the change, bitset[] CPU time is negligible.

Extra: It takes less space than the set.
@jmillan jmillan requested a review from ibc September 30, 2022 08:50
Copy link
Member

@ibc ibc left a comment

Choose a reason for hiding this comment

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

Nice

@jmillan jmillan merged commit 052d4f9 into v3 Sep 30, 2022
@jmillan jmillan deleted the consumer-optimization-find branch September 30, 2022 12:54
piranna pushed a commit to dyte-in/mediasoup that referenced this pull request Feb 9, 2023
…ersatica#919)

This is way more performant.
* Before the change, set.find() could take as much as half of the CPU time
  taken by RtpStreamSend::ReceivePacket().
* After the change, bitset[] CPU time is negligible.

Extra: It takes less space than the set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants