aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2024-02-05 20:29:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-02-05 20:29:19 +0000
commit4a918d4e91de5988ba9968bb40508da05cfaf5a5 (patch)
tree365e2700a0d6df8ca9ab5fa0c7707800b4da7d24
parent9beaa476d62ddc408c4b87e05e262570dcffbce3 (diff)
parent1d82de2aabc986ad1fc85315167baa0f3343f8a7 (diff)
downloadblueprint-4a918d4e91de5988ba9968bb40508da05cfaf5a5.tar.gz
Merge "Optimize blueprint.variationMap.equal" into main
-rw-r--r--context.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/context.go b/context.go
index 39933bf..d682e55 100644
--- a/context.go
+++ b/context.go
@@ -441,7 +441,10 @@ func (vm variationMap) subsetOf(other variationMap) bool {
}
func (vm variationMap) equal(other variationMap) bool {
- return reflect.DeepEqual(vm, other)
+ if len(vm) != len(other) {
+ return false
+ }
+ return vm.subsetOf(other)
}
type singletonInfo struct {