Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 48 for optimization (0.05 sec)

  1. guava/src/com/google/common/graph/Graphs.java

        if (numEdges == 0) {
          return false; // An edge-free graph is acyclic by definition.
        }
        if (!graph.isDirected() && numEdges >= graph.nodes().size()) {
          return true; // Optimization for the undirected case: at least one cycle must exist.
        }
    
        Map<Object, NodeVisitState> visitedNodes =
            Maps.newHashMapWithExpectedSize(graph.nodes().size());
        for (N node : graph.nodes()) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 01 00:26:14 UTC 2025
    - 23.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Joiner.java

         *
         * We could consider recognizing specific other collections as safe (like ImmutableCollection,
         * except ContiguousSet!) or as not worth this optimization (CopyOnWriteArrayList?).
         */
        if (parts instanceof List) {
          int size = ((List<?>) parts).size();
          if (size == 0) {
            return "";
          }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 15:16:19 UTC 2025
    - 21K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Joiner.java

       */
      public String join(Iterable<?> parts) {
        // We don't use the same optimization here as in the JRE flavor.
        // TODO: b/381289911 - Evaluate the performance impact of doing so.
        return join(parts.iterator());
      }
    
      /*
       * TODO: b/381289911 - Make the Iterator overload use StringJoiner (including Android or not)—or
       * some other optimization, given that StringJoiner can over-allocate:
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

        @RetainedLocalRef ListenableFuture<? extends V> delegate = delegateRef;
        maybePropagateCancellationTo(delegate);
    
        @RetainedLocalRef Future<?> localTimer = timer;
        // Try to cancel the timer as an optimization.
        // timer may be null if this call to run was by the timer task since there is no happens-before
        // edge between the assignment to timer and an execution of the timer task.
        if (localTimer != null) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. 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=
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/hash/LittleEndianByteArray.java

           * crashes on Android when running in 32-bit mode. For maximum safety, we shouldn't use
           * Unsafe.getLong() at all, but the performance benefit on x86_64 is too great to ignore, so
           * as a compromise, we enable the optimization only on platforms that we specifically know to
           * work.
           *
           * In the future, the use of Unsafe.getLong() should be replaced by ByteBuffer.getLong(),
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

     * may cause corruption or runtime errors if not. It may however be shared amongst multiple OkHttpClient
     * instances.
     *
     * ## Cache Optimization
     *
     * To measure cache effectiveness, this class tracks three statistics:
     *
     *  * **[Request Count:][requestCount]** the number of HTTP requests issued since this cache was
     *    created.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/FluentIterable.java

        }
        Iterator<E> iterator = iterable.iterator();
        if (!iterator.hasNext()) {
          return Optional.absent();
        }
    
        /*
         * TODO(kevinb): consider whether this "optimization" is worthwhile. Users with SortedSets tend
         * to know they are SortedSets and probably would not call this method.
         */
        if (iterable instanceof SortedSet) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/FluentIterable.java

        }
        Iterator<E> iterator = iterable.iterator();
        if (!iterator.hasNext()) {
          return Optional.absent();
        }
    
        /*
         * TODO(kevinb): consider whether this "optimization" is worthwhile. Users with SortedSets tend
         * to know they are SortedSets and probably would not call this method.
         */
        if (iterable instanceof SortedSet) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/base/Converter.java

          return checkNotNull(otherConverter, "otherConverter");
        }
    
        /*
         * We *could* override convertAll() to return its input, but it's a rather pointless
         * optimization and opened up a weird type-safety problem.
         */
    
        @Override
        public String toString() {
          return "Converter.identity()";
        }
    
        private Object readResolve() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jun 18 21:43:06 UTC 2025
    - 22.8K bytes
    - Viewed (0)
Back to top