Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,016 for init (0.13 sec)

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

        for (int i = 0; i < reps; i++) {
          lock.lock();
          lock.unlock();
        }
      }
    
      @Benchmark
      void orderedPlainLocks(int reps) {
        lockAndUnlockNested(plainLocks, reps);
      }
    
      @Benchmark
      void orderedCycleDetectingLocks(int reps) {
        lockAndUnlockNested(detectingLocks, reps);
      }
    
      private static void lockAndUnlockNested(Lock[] locks, int reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/base/WhitespaceMatcherBenchmark.java

      }
    
      @Benchmark
      public int countIn(int reps) {
        int result = 0;
        CharMatcher matcher = this.matcher;
        String teststring = this.teststring;
        for (int i = 0; i < reps; i++) {
          result += matcher.countIn(teststring);
        }
        return result;
      }
    
      @Benchmark
      public int collapseFrom(int reps) {
        int result = 0;
        CharMatcher matcher = this.matcher;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 16 22:49:59 GMT 2018
    - 3.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/SmallCharMatcher.java

        // Compute the filter.
        long filter = 0;
        int size = chars.cardinality();
        boolean containsZero = chars.get(0);
        // Compute the hash table.
        char[] table = new char[chooseTableSize(size)];
        int mask = table.length - 1;
        for (int c = chars.nextSetBit(0); c != -1; c = chars.nextSetBit(c + 1)) {
          // Compute the filter at the same time.
          filter |= 1L << c;
          int index = smear(c) & mask;
          while (true) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Utf8.java

          throw new IllegalArgumentException(
              "UTF-8 length does not fit in int: " + (utf8Length + (1L << 32)));
        }
        return utf8Length;
      }
    
      private static int encodedLengthGeneral(CharSequence sequence, int start) {
        int utf16Length = sequence.length();
        int utf8Length = 0;
        for (int i = start; i < utf16Length; i++) {
          char c = sequence.charAt(i);
          if (c < 0x800) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java

     */
    public class HashMultisetAddPresentBenchmark {
      private static final int ARRAY_MASK = 0x0ffff;
      private static final int ARRAY_SIZE = 0x10000;
      List<Multiset<Integer>> multisets = new ArrayList<>(0x10000);
      int[] queries = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        Random random = new Random();
        multisets.clear();
        for (int i = 0; i < ARRAY_SIZE; i++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java

          return false;
        }
      }
    
      private int unsafeBinarySearch(Object key) throws ClassCastException {
        return Collections.binarySearch(elements, key, unsafeComparator());
      }
    
      @Override
      boolean isPartialView() {
        return elements.isPartialView();
      }
    
      @Override
      int copyIntoArray(@Nullable Object[] dst, int offset) {
        return elements.copyIntoArray(dst, offset);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/RegularImmutableMultiset.java

          int distinct = multiset.entrySet().size();
          elements = new Object[distinct];
          counts = new int[distinct];
          int i = 0;
          for (Entry<? extends Object> entry : multiset.entrySet()) {
            elements[i] = entry.getElement();
            counts[i] = entry.getCount();
            i++;
          }
        }
    
        Object readResolve() {
          ImmutableMultiset.Builder<Object> builder =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

        Constructor<?> constructor = Class.forName(className).getConstructor(int.class);
        queue = (BlockingQueue<String>) constructor.newInstance(capacity);
    
        strings = new String[capacity];
        for (int i = 0; i < capacity; i++) {
          strings[i] = String.valueOf(Math.random());
        }
      }
    
      @Benchmark
      void addsAndRemoves(int reps) {
        int capacity = this.capacity;
        BlockingQueue<String> queue = this.queue;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/MessageDigestHashFunction.java

        private final int bytes;
        private boolean done;
    
        private MessageDigestHasher(MessageDigest digest, int bytes) {
          this.digest = digest;
          this.bytes = bytes;
        }
    
        @Override
        protected void update(byte b) {
          checkNotDone();
          digest.update(b);
        }
    
        @Override
        protected void update(byte[] b, int off, int len) {
          checkNotDone();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 25 20:32:46 GMT 2022
    - 5K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/hash/HashCodeBenchmark.java

            }
            return (result == 0);
          }
        },
        XORING_TO_INT {
          @Override
          boolean doEquals(byte[] a, byte[] b) {
            if (a.length != b.length) {
              return false;
            }
            int result = 0;
            for (int i = 0; i < a.length; i++) {
              result |= a[i] ^ b[i];
            }
            return (result == 0);
          }
        },
        MESSAGE_DIGEST_IS_EQUAL {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.9K bytes
    - Viewed (0)
Back to top