Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up SingleFieldBuilder.getBuilder() by avoiding reloading this.b…
…uilder at return. See godbolt for Android ART compiler: https://godbolt.org/z/M9dWhdqbf This optimisation brings the implementation down from 284 bytes to 272 bytes. - `GeneratedMessage$Builder SingleFieldBuilder.getBuilder() [284 bytes]` - `GeneratedMessage$Builder SingleFieldBuilder.getBuilder__withLocalVariable() [272 bytes]` It's not big. It's just a few instructions dropped. These were dropped just before the `ret`: ``` -mov x23, x1 -ldr w0, [x23, #8] ``` And this load dropped before calling `markClean`. ``` -ldr w1, [x23, #8] ``` PiperOrigin-RevId: 683619150
- Loading branch information