Skip to content

Translate the base into the destination when using functional record update #15397

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

Closed
pcwalton opened this issue Jul 4, 2014 · 0 comments · Fixed by #16511
Closed

Translate the base into the destination when using functional record update #15397

pcwalton opened this issue Jul 4, 2014 · 0 comments · Fixed by #16511
Labels
A-codegen Area: Code generation I-compiletime Issue: Problems and improvements with respect to compile times. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@pcwalton
Copy link
Contributor

pcwalton commented Jul 4, 2014

We have two ways to codegen functional record update:

  1. Translate the supplied fields in place, translate the base to scratch, and copy over the delta.
  2. Translate the supplied fields to scratch, translate the base in place, and copy over the delta.

Currently we take approach (1). This is not as efficient as approach (2) in most cases, since the whole point of functional record update is usually to update a small number of fields. This would save a few memcpys that show up in I/O.

bors added a commit that referenced this issue Aug 15, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 7, 2023
…ait, r=lnicola

fix: Remove unwraps from "Generate delegate trait"

Fixes rust-lang#15388

This is untested and purely mechanical, maybe some of those `unwrap`s actually made sense, but it probably doesn't hurt to avoid them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation I-compiletime Issue: Problems and improvements with respect to compile times. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant