Skip to content

Use explicit table lookup for ac_q and dc_q#2667

Merged
barrbrain merged 2 commits into
xiph:masterfrom
barrbrain:ac-dc-lookup
Feb 10, 2021
Merged

Use explicit table lookup for ac_q and dc_q#2667
barrbrain merged 2 commits into
xiph:masterfrom
barrbrain:ac-dc-lookup

Conversation

@barrbrain
Copy link
Copy Markdown
Collaborator

@barrbrain barrbrain commented Feb 10, 2021

  • Resolve a surprising compiler decision to invoke memmove.
  • Calculate indices in a way that rustc may elide bounds checks.

Copy link
Copy Markdown
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

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

Removing the & from &table should have the same effect.

Copy link
Copy Markdown
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

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

Please change the first commit message to

Correct a misuse of pattern in a let statement

The expression required the compiler to make a copy of the array referenced

The rest looks good to land.

The original intent was a simple lookup but the expression required
the compiler to make a copy of the array referenced.
Also compute the table indices such that bounds checks are elided.
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