forked from google/auto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In builders, track unset primitive properties with bitmasks rather th…
…an boxing. Previously, an AutoValue property of type `int` was tracked by a field of type `Integer` in the builder. This was solely so that we could use `null` to indicate that the property had not been set. It meant that the memory footprint of a builder that sets primitive properties was bigger than you would expect. AutoValue actually used a bitset for the same purposes in early versions. That was changed because GWT doesn't support `java.util.BitSet`. It does now, but anyway we now use primitive integer fields for the bitset since that is faster and more compact. RELNOTES=AutoValue and AutoBuilder builders now use bitmasks to track unset primitive properties, which will typically lead to smaller builder objects and faster build times. PiperOrigin-RevId: 420374999
- Loading branch information
1 parent
ee741de
commit b5d3989
Showing
12 changed files
with
798 additions
and
52 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
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
Oops, something went wrong.