Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 7 of 7 for getValuesInSet (0.07 seconds)

  1. android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

        this.random = checkNotNull(random);
        this.hitRate = hitRate;
        this.size = size;
    
        this.valuesInSet = createData();
        this.queries = createQueries(valuesInSet, 1024);
      }
    
      Set<Element> getValuesInSet() {
        return valuesInSet;
      }
    
      Element[] getQueries() {
        return queries;
      }
    
      private Element[] createQueries(Set<Element> elementsInSet, int numQueries) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

        this.random = checkNotNull(random);
        this.hitRate = hitRate;
        this.size = size;
    
        this.valuesInSet = createData();
        this.queries = createQueries(valuesInSet, 1024);
      }
    
      Set<Element> getValuesInSet() {
        return valuesInSet;
      }
    
      Element[] getQueries() {
        return queries;
      }
    
      private Element[] createQueries(Set<Element> elementsInSet, int numQueries) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  3. android/guava-tests/benchmark/com/google/common/collect/SetIterationBenchmark.java

      @BeforeExperiment
      void setUp() {
        CollectionBenchmarkSampleData sampleData =
            new CollectionBenchmarkSampleData(true, random, 0.8, size);
        setToTest = (Set<Element>) impl.create(sampleData.getValuesInSet());
      }
    
      @Benchmark
      int iteration(int reps) {
        int x = 0;
    
        for (int i = 0; i < reps; i++) {
          for (Element y : setToTest) {
            x ^= System.identityHashCode(y);
          }
        }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2K bytes
    - Click Count (0)
  4. guava-tests/benchmark/com/google/common/collect/MapBenchmark.java

            new CollectionBenchmarkSampleData(isUserTypeFast, random, hitRate, size);
    
        if (sortedData) {
          List<Element> valueList = new ArrayList<>(sampleData.getValuesInSet());
          sort(valueList);
          values = valueList;
        } else {
          values = sampleData.getValuesInSet();
        }
        this.mapToTest = impl.create(values);
        this.queries = sampleData.getQueries();
      }
    
      @Benchmark
      boolean get(int reps) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 7.8K bytes
    - Click Count (0)
  5. guava-tests/benchmark/com/google/common/collect/SetCreationBenchmark.java

      }
    
      @Benchmark
      int creation(int reps) {
        int x = 0;
        for (int i = 0; i < reps; i++) {
          x ^= System.identityHashCode(impl.create(sampleData.getValuesInSet()));
        }
        return x;
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 1.8K bytes
    - Click Count (0)
  6. guava-tests/benchmark/com/google/common/collect/SetContainsBenchmark.java

      void setUp() {
        CollectionBenchmarkSampleData sampleData =
            new CollectionBenchmarkSampleData(isUserTypeFast, random, hitRate, size);
    
        this.setToTest = (Set<Element>) impl.create(sampleData.getValuesInSet());
        this.queries = sampleData.getQueries();
      }
    
      @Benchmark
      boolean contains(int reps) {
        // Paranoia: acting on hearsay that accessing fields might be slow
        // Should write a benchmark to test that!
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  7. android/guava-tests/benchmark/com/google/common/collect/MapsMemoryBenchmark.java

      public void prepareContents() throws Exception {
        mapsImpl = mapEnums.get(implName);
        elems = new CollectionBenchmarkSampleData(elements);
        contents = new HashMap<>();
        for (Element key : elems.getValuesInSet()) {
          contents.put(key, key);
        }
        map = mapsImpl.create(contents);
      }
    
      @Benchmark
      @Footprint(exclude = Element.class)
      public Map<Element, Element> create() throws Exception {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 3.4K bytes
    - Click Count (0)
Back to Top