Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for IntersectInPlace (0.19 sec)

  1. pkg/util/sets/set_test.go

    			s1.DifferenceInPlace(s2)
    		}
    	})
    	b.Run("Intersection", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			s1.Intersection(s2)
    		}
    	})
    	b.Run("IntersectInPlace", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			s1.IntersectInPlace(s2)
    		}
    	})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. pkg/util/sets/set.go

    	result := New[T]()
    	for key := range s {
    		if s2.Contains(key) {
    			result.Insert(key)
    		}
    	}
    	return result
    }
    
    // IntersectInPlace similar to Intersection, but has better performance.
    // Note: This function modifies s in place.
    func (s Set[T]) IntersectInPlace(s2 Set[T]) Set[T] {
    	for key := range s {
    		if !s2.Contains(key) {
    			delete(s, key)
    		}
    	}
    	return s
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. pilot/pkg/xds/workload.go

    			addresses = updatedAddresses
    		} else {
    			// this is from the external triggers instead of request
    			// send response for all the subscribed intersect with the updated
    			addresses = updatedAddresses.IntersectInPlace(subs)
    		}
    	}
    
    	if !w.Wildcard {
    		// We only need this for on-demand. This allows us to subscribe the client to resources they
    		// didn't explicitly request.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 14:14:30 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. pilot/pkg/config/kube/gateway/controller.go

    	touchedNamespaceLabels.InsertAll(getLabelKeys(newNs)...)
    
    	// Next, we find all keys our Gateways actually reference.
    	c.stateMu.RLock()
    	intersection := touchedNamespaceLabels.IntersectInPlace(c.state.ReferencedNamespaceKeys)
    	c.stateMu.RUnlock()
    
    	// If there was any overlap, then a relevant namespace label may have changed, and we trigger a
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 13.5K bytes
    - Viewed (0)
Back to top