- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 95 for nextLine (0.18 sec)
-
guava-tests/benchmark/com/google/common/collect/ComparatorDelegationOverheadBenchmark.java
@BeforeExperiment void setUp() throws Exception { Random rng = new Random(); for (int i = 0; i < 0x100; i++) { Integer[] array = new Integer[n]; for (int j = 0; j < n; j++) { array[j] = rng.nextInt(); } inputArrays[i] = array; } } @Benchmark int arraysSortNoComparator(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 2.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java
sb.ensureCapacity(size); for (int k = 0; k < size; k++) { // [9-127) includes all ascii non-control characters sb.append((char) (random.nextInt(127 - 9) + 9)); } data = sb.toString(); } @Benchmark public long timeCopy(int reps) throws IOException { long r = 0; final String localData = data;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:59:54 UTC 2023 - 3.2K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java
sb.ensureCapacity(size); for (int k = 0; k < size; k++) { // [9-127) includes all ascii non-control characters sb.append((char) (random.nextInt(127 - 9) + 9)); } data = sb.toString(); } @Benchmark public long timeCopy(int reps) throws IOException { long r = 0; final String localData = data;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:59:54 UTC 2023 - 3.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java
public void testDivideRemainderEuclideanProperty() { // Use a seed so that the test is deterministic: Random r = new Random(0L); for (int i = 0; i < 1000000; i++) { int dividend = r.nextInt(); int divisor = r.nextInt(); // Test that the Euclidean property is preserved: assertThat( dividend - (divisor * UnsignedInts.divide(dividend, divisor)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 12.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java
for (int i = 0; i < ARRAY_SIZE; i++) { positive[i] = randomPositiveBigInteger(Integer.SIZE - 2).intValue(); nonzero[i] = randomNonZeroBigInteger(Integer.SIZE - 2).intValue(); ints[i] = RANDOM_SOURCE.nextInt(); } } @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"}) RoundingMode mode; @Benchmark int log2(int reps) { int tmp = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
* * @author Colin Decker */ public class ChecksumBenchmark { // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons. private static final int RANDOM_SEED = new Random().nextInt(); @Param({"10", "1000", "100000", "1000000"}) private int size; private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size];
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 16:53:43 UTC 2024 - 3.4K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java
void setUp() { checkArgument(size > 0, "empty collection not supported"); Set<Integer> set = new LinkedHashSet<>(size); Random random = new Random(); while (set.size() < size) { set.add(random.nextInt()); } List<Integer> list = new ArrayList<>(set); inputOrder.arrange(list); input = ImmutableList.copyOf(list); } @Benchmark int collections(int reps) { int dummy = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
sb.ensureCapacity(size); for (int k = 0; k < size; k++) { // [9-127) includes all ascii non-control characters sb.append((char) (random.nextInt(127 - 9) + 9)); } String string = sb.toString(); sb.setLength(0); data = ByteSource.wrap(string.getBytes(charset)); } @Benchmark public int timeCopy(int reps) throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 5.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
return hashFn; } } // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons. private static final int RANDOM_SEED = new Random().nextInt(); private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; new Random(RANDOM_SEED).nextBytes(testBytes); } @Benchmark
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
return hashFn; } } // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons. private static final int RANDOM_SEED = new Random().nextInt(); private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; new Random(RANDOM_SEED).nextBytes(testBytes); } @Benchmark
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0)