Skip to content

Refactor CDF access so that size is always statically known - #2673

Merged
barrbrain merged 10 commits into
xiph:masterfrom
barrbrain:cdf-static-size
Feb 18, 2021
Merged

barrbrain merged 10 commits into
xiph:masterfrom
barrbrain:cdf-static-size

Conversation

@barrbrain

@barrbrain barrbrain commented Feb 16, 2021 •

Copy link
Copy Markdown
Collaborator

While removing explicit slices for CDF access, it was shown that some were not ordered by size in CDFContext. This violates the invariant introduced in PR #2664, to guarantee non-overlapping writes at rollback. This change ensures that the invariant holds.
As the CDF expressions passed to symbol_with_update! all become mutable references to arrays, we can specialise symbol_with_update() for small numbers of CDF symbols. This yields a speed-up on the order of 1.5%.

@coveralls

coveralls commented Feb 16, 2021 •

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage decreased (-0.06%) to 82.945% when pulling 33f31e7 on barrbrain:cdf-static-size into e9be6c9 on xiph:master.

@barrbrain
barrbrain force-pushed the cdf-static-size branch 2 times, most recently from 7202631 to 6b3b63a Compare February 16, 2021 15:55
@barrbrain
barrbrain marked this pull request as ready for review February 16, 2021 16:10
Comment thread src/context/cdf_context.rs

@lu-zero lu-zero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me.

@barrbrain
barrbrain merged commit 33f31e7 into xiph:master Feb 18, 2021
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.

3 participants