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

Use explicit table lookup for ac_q and dc_q #2667

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

barrbrain
Copy link
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
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
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