Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for Benchmarks (0.05 sec)

  1. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

     */
    
    package com.google.common.util.concurrent;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.lang.reflect.Constructor;
    import java.util.concurrent.BlockingQueue;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Benchmarks for {@link Monitor}.
     *
     * @author Justin T. Sampson
     */
    @NullUnmarked
    public class MonitorBenchmark {
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  2. android/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-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)
  4. 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)
  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. guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java

    import com.google.caliper.Benchmark;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Simple benchmark: create, start, read. This does not currently report the most useful result
     * because it's ambiguous to what extent the stopwatch benchmark is being affected by GC.
     *
     * @author Kevin Bourrillion
     */
    @NullUnmarked
    public class StopwatchBenchmark {
      @Benchmark
      long stopwatch(int reps) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java

    import com.google.caliper.Benchmark;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Simple benchmark: create, start, read. This does not currently report the most useful result
     * because it's ambiguous to what extent the stopwatch benchmark is being affected by GC.
     *
     * @author Kevin Bourrillion
     */
    @NullUnmarked
    public class StopwatchBenchmark {
      @Benchmark
      long stopwatch(int reps) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

      @ParametricNullness
      static <V extends @Nullable Object, X extends Exception> V getChecked(
          Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) throws X {
        // TODO(cpovirk): benchmark a version of this method that accepts a GetCheckedTypeValidator
        bestGetCheckedTypeValidator().validateClass(exceptionClass);
        try {
          return future.get(timeout, unit);
        } catch (InterruptedException e) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

      @ParametricNullness
      static <V extends @Nullable Object, X extends Exception> V getChecked(
          Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) throws X {
        // TODO(cpovirk): benchmark a version of this method that accepts a GetCheckedTypeValidator
        bestGetCheckedTypeValidator().validateClass(exceptionClass);
        try {
          return future.get(timeout, unit);
        } catch (InterruptedException e) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 10.2K bytes
    - Viewed (0)
Back to top