Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,212 for FOR (0.16 sec)

  1. guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java

      @Benchmark
      int arrayIndexedLength(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (int index = 0; index < array.length; index++) {
            sum += array[index].hashCode();
          }
        }
        return sum;
      }
    
      @Benchmark
      int arrayFor(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (Object value : array) {
            sum += value.hashCode();
          }
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.1K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/base/JoinerBenchmark.java

       * Only appends delimiter if the accumulated string is non-empty. Note: this isn't a candidate
       * implementation for Joiner since it fails on leading empty components.
       */
      @Benchmark
      int stringBuilderIsEmpty(int reps) {
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          StringBuilder sb = new StringBuilder();
          for (String comp : components) {
            if (sb.length() > 0) {
              sb.append(DELIMITER_STRING);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/collect/ImmutableListCreationBenchmark.java

        for (int rep = 0; rep < reps; rep++) {
          List<Object> builder = Lists.newArrayList();
          for (int i = 0; i < size; i++) {
            builder.add(OBJECT);
          }
          dummy += ImmutableList.copyOf(builder).size();
        }
        return dummy;
      }
    
      @Benchmark
      int copyPreSizedArrayList(int reps) {
        int size = this.size;
        int tmp = 0;
        for (int rep = 0; rep < reps; rep++) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/GraphPropertiesTest.java

      }
    
      @Test
      public void hasCycle_isolatedNodes() {
        for (MutableGraph<Integer> graph : graphsToTest) {
          graph.addNode(1);
          graph.addNode(2);
        }
        assertThat(hasCycle(directedGraph)).isFalse();
        assertThat(hasCycle(undirectedGraph)).isFalse();
      }
    
      @Test
      public void hasCycle_oneEdge() {
        for (MutableGraph<Integer> graph : graphsToTest) {
          graph.putEdge(1, 2);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 07 15:09:01 GMT 2016
    - 5.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

      public void testCrc32cStrideTable() {
        int next = CRC32C_GENERATOR_FLIPPED;
        for (int i = 0; i < 12; i++) { // for 3 ints = 12 bytes in between each stride window
          next = (next >>> 8) ^ Crc32cHashFunction.Crc32cHasher.BYTE_TABLE[next & 0xFF];
        }
        int[][] expected = new int[4][256];
        for (int b = 0; b < 4; ++b) {
          for (int bit = 128; bit != 0; bit >>= 1) {
            expected[b][bit] = next;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  6. CONTRIBUTING.md

    How to contribute
    =================
    
    Thank you so much for wanting to contribute to Guava! Here are a few important
    things you should know about contributing:
    
    1.  API changes require discussion, use cases, etc. Code comes later.
    2.  Pull requests are great for small fixes for bugs, documentation, etc.
    3.  Pull requests are not merged directly into the master branch.
    4.  Code contributions require signing a Google CLA.
    
    API changes
    -----------
    
    Plain Text
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Nov 17 18:47:47 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

     *
     * <ul>
     *   <li>size: The length of the byte array to hash.
     *   <li>hashFunctionEnum: The {@link HashFunction} to use for hashing.
     * </ul>
     *
     * @author Kurt Alfred Kluever
     */
    public class HashFunctionBenchmark {
    
      // Use a statically configured random instance for all of the benchmarks
      private static final Random random = new Random(42);
    
      @Param({"10", "1000", "100000", "1000000"})
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

        lockAndUnlockNested(detectingLocks, reps);
      }
    
      private static void lockAndUnlockNested(Lock[] locks, int reps) {
        for (int i = 0; i < reps; i++) {
          for (int j = 0; j < locks.length; j++) {
            locks[j].lock();
          }
          for (int j = locks.length - 1; j >= 0; j--) {
            locks[j].unlock();
          }
        }
      }
    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)
  9. guava-gwt/src/com/google/common/util/concurrent/Concurrent.gwt.xml

        for prod and one for tests. However, unlike our other packages, as of this
        writing it has test supersource but no prod supersource.
    
        GWT happens to use the prod .gwt.xml, so it looks for no supersource for
        tests, either. This causes it to fail to find AtomicLongMapTest.
    
        Our workaround is to tell GWT that util.concurrent and all other packages
    XML
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jul 19 04:29:50 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/AbstractImmutableTableTest.java

      public final void testClear() {
        for (Table<Character, Integer, String> testInstance : getTestInstances()) {
          try {
            testInstance.clear();
            fail();
          } catch (UnsupportedOperationException e) {
            // success
          }
        }
      }
    
      public final void testPut() {
        for (Table<Character, Integer, String> testInstance : getTestInstances()) {
          try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top