Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 208 for BenchmarkX (0.06 sec)

  1. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.base;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    
    /**
     * Microbenchmark for {@link com.google.common.base.Strings#repeat}
     *
     * @author Mike Cripps
     */
    public class StringsRepeatBenchmark {
      @Param({"1", "5", "25", "125"})
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Sep 17 20:24:24 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/collect/PowerSetBenchmark.java

    import static com.google.common.collect.DiscreteDomain.integers;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.util.Set;
    
    /**
     * Very simple powerSet iteration benchmark.
     *
     * @author Kevin Bourrillion
     */
    public class PowerSetBenchmark {
      @Param({"2", "4", "8", "16"})
      int elements;
    
      Set<Set<Integer>> powerSet;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/base/SplitterBenchmark.java

      @BeforeExperiment
      void setUp() {
        input = Strings.repeat(text, length);
      }
    
      @Benchmark
      int charSplitter(int reps) {
        int total = 0;
    
        for (int i = 0; i < reps; i++) {
          total += Iterables.size(CHAR_SPLITTER.split(input));
        }
    
        return total;
      }
    
      @Benchmark
      int stringSplitter(int reps) {
        int total = 0;
    
        for (int i = 0; i < reps; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
    
    /**
     * Benchmark for HashMultiset.add for an already-present element.
     *
     * @author Louis Wasserman
     */
    public class HashMultisetAddPresentBenchmark {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 1.6K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java

     */
    
    package com.google.common.cache;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import com.google.common.cache.LocalCache.Segment;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Benchmark for {@code LocalCache.Segment.removeEntryFromChain}.
     *
     * @author Charles Fry
     */
    @SuppressWarnings("CheckReturnValue")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 17 15:19:38 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/cache/SegmentBenchmark.java

    import static com.google.common.base.Preconditions.checkState;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import com.google.common.cache.LocalCache.Segment;
    import java.util.concurrent.atomic.AtomicReferenceArray;
    
    /**
     * Benchmark for {@code LocalCache.Segment.expand()}.
     *
     * @author Charles Fry
     */
    public class SegmentBenchmark {
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 23 16:59:39 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import com.google.caliper.Benchmark;
    
    /**
     * Benchmarking interners.
     *
     * @author Dimitris Andreou
     */
    public class InternersBenchmark {
      @Benchmark
      int weakInterner(int reps) {
        Interner<String> interner = Interners.newWeakInterner();
        for (int i = 0; i < reps; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Mar 04 04:06:35 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java

        // TODO(kevinb): convert to assert once benchmark tests enable asserts by default
        Preconditions.checkState(hashMultiset.size() == size);
      }
    
      @Benchmark
      int hashMultiset(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (Object value : hashMultiset) {
            sum += value.hashCode();
          }
        }
        return sum;
      }
    
      @Benchmark
      int linkedHashMultiset(int reps) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/primitives/UnsignedBytesBenchmark.java

        unsafeImpl = UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator.INSTANCE;
      }
    
      @Benchmark
      void longEqualJava(int reps) {
        for (int i = 0; i < reps; ++i) {
          if (javaImpl.compare(ba1, ba2) != 0) {
            throw new Error(); // deoptimization
          }
        }
      }
    
      @Benchmark
      void longEqualUnsafe(int reps) {
        for (int i = 0; i < reps; ++i) {
          if (unsafeImpl.compare(ba1, ba2) != 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java

        // TODO(kevinb): convert to assert once benchmark tests enable asserts by default
        Preconditions.checkState(hashMultiset.size() == size);
      }
    
      @Benchmark
      int hashMultiset(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (Object value : hashMultiset) {
            sum += value.hashCode();
          }
        }
        return sum;
      }
    
      @Benchmark
      int linkedHashMultiset(int reps) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 2.7K bytes
    - Viewed (0)
Back to top