Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 81 for Benchmarks (0.04 sec)

  1. android/guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java

    package com.google.common.hash;
    
    import static java.nio.charset.StandardCharsets.UTF_8;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.util.Random;
    import org.jspecify.annotations.NullUnmarked;
    
    /** Benchmarks for the hashing of UTF-8 strings. */
    @NullUnmarked
    public class HashStringBenchmark {
      static class MaxCodePoint {
        final int value;
    
        /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/MathBenchmarking.java

     * limitations under the License.
     */
    
    package com.google.common.math;
    
    import java.math.BigInteger;
    import java.util.Random;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Utilities for benchmarks.
     *
     * <p>In many cases, we wish to vary the order of magnitude of the input as much as we want to vary
     * the input itself, so most methods which generate values use an exponential distribution varying
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/LongMath.java

        return x > 0 & (x & (x - 1)) == 0;
      }
    
      /**
       * Returns 1 if {@code x < y} as unsigned longs, and 0 otherwise. Assumes that x - y fits into a
       * signed long. The implementation is branch-free, and benchmarks suggest it is measurably faster
       * than the straightforward ternary expression.
       */
      @VisibleForTesting
      static int lessThanBranchFree(long x, long y) {
        // Returns the sign bit of x - y.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 29 16:20:07 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /** Benchmarks for {@link ExecutionList}. */
    @VmOptions({"-Xms8g", "-Xmx8g"})
    @NullUnmarked
    public class ExecutionListBenchmark {
      private static final int NUM_THREADS = 10; // make a param?
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.ConcurrentMap;
    import java.util.concurrent.ConcurrentSkipListMap;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Helper classes for various benchmarks.
     *
     * @author Christopher Swenson
     */
    @NullUnmarked
    final class BenchmarkHelpers {
      /** So far, this is the best way to test various implementations of {@link Set} subclasses. */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/TopKSelector.java

     * #offer} and a call to {@link #topK}, with O(k) memory. In comparison, quickselect has the same
     * asymptotics but requires O(n) memory, and a {@code PriorityQueue} implementation takes O(n log
     * k). In benchmarks, this implementation performs at least as well as either implementation, and
     * degrades more gracefully for worst-case input.
     *
     * <p>The implementation does not necessarily use a <i>stable</i> sorting algorithm; when multiple
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 31 13:15:26 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     * weak references.
     *
     * <p><strong>Performance</strong>
     *
     * <p>The extra bookkeeping done by cycle detecting locks comes at some cost to performance.
     * Benchmarks (as of December 2011) show that:
     *
     * <ul>
     *   <li>for an unnested {@code lock()} and {@code unlock()}, a cycle detecting lock takes 38ns as
     *       opposed to the 24ns taken by a plain lock.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 18 15:05:43 UTC 2025
    - 35.9K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/math/DoubleMathBenchmark.java

          factorials[i] = RANDOM_SOURCE.nextInt(100);
        }
      }
    
      @Benchmark
      long log2(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += Double.doubleToRawLongBits(DoubleMath.log2(positiveDoubles[j]));
        }
        return tmp;
      }
    
      @Benchmark
      long factorial(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java

     */
    
    package com.google.common.collect;
    
    import com.google.caliper.Benchmark;
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Benchmarking interners.
     *
     * @author Dimitris Andreou
     */
    @NullUnmarked
    public class InternersBenchmark {
      @CanIgnoreReturnValue
      @Benchmark
      int weakInterner(int reps) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Feb 11 19:03:19 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/base/ObjectsBenchmark.java

      }
    
      @Benchmark
      int hashString_4(int reps) {
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          dummy += Objects.hashCode(S0, S1, S2, S3);
        }
        return dummy;
      }
    
      @Benchmark
      int hashString_5(int reps) {
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          dummy += Objects.hashCode(S0, S1, S2, S3, S4);
        }
        return dummy;
      }
    
      @Benchmark
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top