Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for expensive (0.24 sec)

  1. guava-gwt/test/com/google/common/GwtTestSuite.java

    import junit.framework.TestCase;
    
    import java.io.IOException;
    
    /**
     * Runs all _gwt tests. Grouping them into a suite is much faster than running each as a one-test
     * "suite," as the per-suite setup is expensive.
     */
    public class GwtTestSuite extends TestCase {
      public static Test suite() throws IOException {
        GWTTestSuite suite = new GWTTestSuite();
        for (ClassInfo info
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jun 23 13:24:59 GMT 2016
    - 1.6K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

     */
    public class MinMaxPriorityQueueBenchmark {
      @Param private ComparatorType comparator;
    
      // TODO(kevinb): add 1000000 back when we have the ability to throw
      // NotApplicableException in the expensive comparator case.
      @Param({"100", "10000"})
      private int size;
    
      @Param private HeapType heap;
    
      private Queue<Integer> queue;
    
      private final Random random = new Random();
    
      @BeforeExperiment
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/collect/MapBenchmark.java

        Map<Element, Element> map = mapToTest;
        Element[] queries = this.queries;
    
        // Allows us to use & instead of %, acting on hearsay that division
        // operators (/%) are disproportionately expensive; should test this too!
        int mask = queries.length - 1;
    
        boolean dummy = false;
        for (int i = 0; i < reps; i++) {
          dummy ^= map.get(queries[i & mask]) != null;
        }
        return dummy;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

           * consistency with how weak references are cleared). That's a behavior change -- arguably the
           * removal of a feature.
           *
           * Fortunately, exceptions rarely contain references to expensive resources.
           */
    
          //
          seenExceptionsLocal = newConcurrentHashSet();
          /*
           * Other handleException() callers may see this as soon as we publish it. We need to populate
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/RangeMap.java

       * same value those two ranges will be coalesced.
       *
       * <p><b>Note:</b> coalescing requires calling {@code .equals()} on any connected values, which
       * may be expensive depending on the value type. Using this method on range maps with large values
       * such as {@link Collection} types is discouraged.
       *
       * @since 22.0
       */
      void putCoalescing(Range<K> range, V value);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

     *
     * <p>Occasionally, an API will return a plain {@code Future} and it will be impossible to change
     * the return type. For this case, we provide a more expensive workaround in {@code
     * JdkFutureAdapters}. However, when possible, it is more efficient and reliable to create a {@code
     * ListenableFuture} directly.
     *
     * @author Sven Mawson
     * @author Nishant Thakkar
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ComparisonChain.java

     * inputs' {@link Comparable#compareTo compareTo} and {@link Comparator#compare compare} methods as
     * soon as one of them returns a nonzero result. This optimization is typically important only in
     * the presence of expensive {@code compareTo} and {@code compare} implementations.
     *
     * <p>See the Guava User Guide article on <a href=
     * "https://github.com/google/guava/wiki/CommonObjectUtilitiesExplained#comparecompareto">{@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jan 24 17:47:51 GMT 2022
    - 9.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/graph/StandardValueGraph.java

        this.isDirected = builder.directed;
        this.allowsSelfLoops = builder.allowsSelfLoops;
        this.nodeOrder = builder.nodeOrder.cast();
        // Prefer the heavier "MapRetrievalCache" for nodes if lookup is expensive.
        this.nodeConnections =
            (nodeConnections instanceof TreeMap)
                ? new MapRetrievalCache<N, GraphConnections<N, V>>(nodeConnections)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/CompactHashing.java

      }
    
      /**
       * Returns a larger power of 2 hashtable size given the current mask.
       *
       * <p>For hashtable sizes less than or equal to 32, the returned power of 2 is 4x the current
       * hashtable size to reduce expensive rehashing. Otherwise the returned power of 2 is 2x the
       * current hashtable size.
       */
      static int newCapacity(int mask) {
        return ((mask < 32) ? 4 : 2) * (mask + 1);
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Aug 02 21:41:22 GMT 2021
    - 7.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/CompactHashing.java

      }
    
      /**
       * Returns a larger power of 2 hashtable size given the current mask.
       *
       * <p>For hashtable sizes less than or equal to 32, the returned power of 2 is 4x the current
       * hashtable size to reduce expensive rehashing. Otherwise the returned power of 2 is 2x the
       * current hashtable size.
       */
      static int newCapacity(int mask) {
        return ((mask < 32) ? 4 : 2) * (mask + 1);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Aug 02 21:41:22 GMT 2021
    - 7.1K bytes
    - Viewed (0)
Back to top