-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rust protobuf: remove the need for a generated
placement_new
thunk
We have been relying on a per-message generated `placement_new` function for implementing map insertion, but this CL simplifies things by removing that. Instead, we do a reflective swap if possible, or else fall back on a copy. This will probably make insertions a bit slower, but I think it may be worth it because it should make it much simpler to have a blanket implementation for ProxedInMapValue that works for all map types. It looks like it should be possible to make this faster in the future by implementing a bitwise move that will work for any message. PiperOrigin-RevId: 676495920
- Loading branch information
1 parent
8681742
commit 5c3d1e8
Showing
4 changed files
with
48 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters