Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for 2x (0.13 sec)

  1. guava-tests/test/com/google/common/collect/AbstractHashFloodingTest.java

              .that(ratio)
              .isAtMost(
                  2
                      * constructionAsymptotics.applyAsDouble(largeSize)
                      / constructionAsymptotics.applyAsDouble(smallSize));
          // allow up to 2x wobble in the constant factors
        }
      }
    
      public void testResistsHashFloodingOnQuery() {
        CallsCounter smallCounter = new CallsCounter();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 21:01:39 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/HashingTest.java

        Random r = new Random(9);
        for (int i = 0; i < ITERS; i++) {
          countRemaps(r.nextLong(), map);
        }
        for (int shard = 2; shard <= MAX_SHARDS; shard++) {
          // Rough: don't exceed 1.2x the expected number of remaps by more than 20
          assertTrue(map.get(shard) <= 1.2 * ITERS / shard + 20);
        }
      }
    
      private void countRemaps(long h, AtomicLongMap<Integer> map) {
        int last = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/CompactHashing.java

       *
       * <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);
      }
    
      /** Returns the hash prefix given the current mask. */
    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)
  4. android/guava/src/com/google/common/collect/CompactHashing.java

       *
       * <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);
      }
    
      /** Returns the hash prefix given the current mask. */
    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)
  5. guava-tests/test/com/google/common/hash/HashingTest.java

        Random r = new Random(9);
        for (int i = 0; i < ITERS; i++) {
          countRemaps(r.nextLong(), map);
        }
        for (int shard = 2; shard <= MAX_SHARDS; shard++) {
          // Rough: don't exceed 1.2x the expected number of remaps by more than 20
          assertTrue(map.get(shard) <= 1.2 * ITERS / shard + 20);
        }
      }
    
      private void countRemaps(long h, AtomicLongMap<Integer> map) {
        int last = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

          int newCapacity = calculateNewCapacity();
          Object[] newQueue = new Object[newCapacity];
          System.arraycopy(queue, 0, newQueue, 0, queue.length);
          queue = newQueue;
        }
      }
    
      /** Returns ~2x the old capacity if small; ~1.5x otherwise. */
      private int calculateNewCapacity() {
        int oldCapacity = queue.length;
        int newCapacity =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
Back to top