Skip to content

Commit

Permalink
Use Array for byClass reachability info
Browse files Browse the repository at this point in the history
This reduces the retained size on the test suite for the infos as
follows:

BaseLinker: 26MB -> 24MB
Refiner:    22MB -> 20MB
  • Loading branch information
gzm0 committed Apr 13, 2024
1 parent 95c38be commit 175ec62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ object Infos {
)

final class ReachabilityInfo private[Infos] (
val byClass: List[ReachabilityInfoInClass],
val byClass: Array[ReachabilityInfoInClass],
val globalFlags: ReachabilityInfo.Flags
)

Expand Down Expand Up @@ -374,7 +374,7 @@ object Infos {
setFlag(ReachabilityInfo.FlagUsedExponentOperator)

def result(): ReachabilityInfo =
new ReachabilityInfo(byClass.valuesIterator.map(_.result()).toList, flags)
new ReachabilityInfo(byClass.valuesIterator.map(_.result()).toArray, flags)
}

final class ReachabilityInfoInClassBuilder(val className: ClassName) {
Expand Down

0 comments on commit 175ec62

Please sign in to comment.