Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Growth (0.05 sec)

  1. src/bytes/buffer.go

    	// we allocate buffers rounded up to the closest size class.
    	c := len(b) + n // ensure enough space for n elements
    	if c < 2*cap(b) {
    		// The growth rate has historically always been 2x. In the future,
    		// we could rely purely on append to determine the growth rate.
    		c = 2 * cap(b)
    	}
    	b2 := append([]byte(nil), make([]byte, c)...)
    	i := copy(b2, b)
    	return b2[:i]
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Oct 29 16:47:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

      }
    
      public void testBuilder_presize_negative() {
        assertThrows(IllegalArgumentException.class, () -> ImmutableDoubleArray.builder(-1));
      }
    
      /**
       * If there's a bug in builder growth, we wouldn't know how to expose it. So, brute force the hell
       * out of it for a while and see what happens.
       */
      public void testBuilder_bruteForce() {
        for (int i = 0; i < reduceIterationsIfGwt(100); i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

      }
    
      public void testBuilder_presize_negative() {
        assertThrows(IllegalArgumentException.class, () -> ImmutableIntArray.builder(-1));
      }
    
      /**
       * If there's a bug in builder growth, we wouldn't know how to expose it. So, brute force the hell
       * out of it for a while and see what happens.
       */
      public void testBuilder_bruteForce() {
        for (int i = 0; i < reduceIterationsIfGwt(100); i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

      }
    
      public void testBuilder_presize_negative() {
        assertThrows(IllegalArgumentException.class, () -> ImmutableDoubleArray.builder(-1));
      }
    
      /**
       * If there's a bug in builder growth, we wouldn't know how to expose it. So, brute force the hell
       * out of it for a while and see what happens.
       */
      public void testBuilder_bruteForce() {
        for (int i = 0; i < reduceIterationsIfGwt(100); i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/ImmutableLongArray.java

      @SuppressWarnings("Java7ApiChecker")
      @IgnoreJRERequirement // Users will use this only if they're already using streams.
      public static ImmutableLongArray copyOf(LongStream stream) {
        // Note this uses very different growth behavior from copyOf(Iterable) and the builder.
        long[] array = stream.toArray();
        return (array.length == 0) ? EMPTY : new ImmutableLongArray(array);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/primitives/ImmutableIntArray.java

       *
       * @since 22.0 (but only since 33.4.0 in the Android flavor)
       */
      public static ImmutableIntArray copyOf(IntStream stream) {
        // Note this uses very different growth behavior from copyOf(Iterable) and the builder.
        int[] array = stream.toArray();
        return (array.length == 0) ? EMPTY : new ImmutableIntArray(array);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/ImmutableIntArray.java

      @SuppressWarnings("Java7ApiChecker")
      @IgnoreJRERequirement // Users will use this only if they're already using streams.
      public static ImmutableIntArray copyOf(IntStream stream) {
        // Note this uses very different growth behavior from copyOf(Iterable) and the builder.
        int[] array = stream.toArray();
        return (array.length == 0) ? EMPTY : new ImmutableIntArray(array);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/ImmutableDoubleArray.java

      @SuppressWarnings("Java7ApiChecker")
      @IgnoreJRERequirement // Users will use this only if they're already using streams.
      public static ImmutableDoubleArray copyOf(DoubleStream stream) {
        // Note this uses very different growth behavior from copyOf(Iterable) and the builder.
        double[] array = stream.toArray();
        return (array.length == 0) ? EMPTY : new ImmutableDoubleArray(array);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 23K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/Ints.java

       *
       * @param array the source array
       * @param minLength the minimum length the returned array must guarantee
       * @param padding an extra amount to "grow" the array by if growth is necessary
       * @throws IllegalArgumentException if {@code minLength} or {@code padding} is negative
       * @return an array containing the values of {@code array}, with guaranteed minimum length {@code
       *     minLength}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 31K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/primitives/Doubles.java

       *
       * @param array the source array
       * @param minLength the minimum length the returned array must guarantee
       * @param padding an extra amount to "grow" the array by if growth is necessary
       * @throws IllegalArgumentException if {@code minLength} or {@code padding} is negative
       * @return an array containing the values of {@code array}, with guaranteed minimum length {@code
       *     minLength}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 28.1K bytes
    - Viewed (0)
Back to top