- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Benchmarks (0.05 sec)
-
guava/src/com/google/common/math/LongMath.java
return x > 0 & (x & (x - 1)) == 0; } /** * Returns 1 if {@code x < y} as unsigned longs, and 0 otherwise. Assumes that x - y fits into a * signed long. The implementation is branch-free, and benchmarks suggest it is measurably faster * than the straightforward ternary expression. */ @VisibleForTesting static int lessThanBranchFree(long x, long y) { // Returns the sign bit of x - y.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Aug 29 16:20:07 UTC 2025 - 46.8K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java
import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; import java.util.logging.Logger; import org.jspecify.annotations.NullUnmarked; import org.jspecify.annotations.Nullable; /** Benchmarks for {@link ExecutionList}. */ @VmOptions({"-Xms8g", "-Xmx8g"}) @NullUnmarked public class ExecutionListBenchmark { private static final int NUM_THREADS = 10; // make a param?
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 15.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentSkipListMap; import org.jspecify.annotations.NullUnmarked; /** * Helper classes for various benchmarks. * * @author Christopher Swenson */ @NullUnmarked final class BenchmarkHelpers { /** So far, this is the best way to test various implementations of {@link Set} subclasses. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 12.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/TopKSelector.java
* #offer} and a call to {@link #topK}, with O(k) memory. In comparison, quickselect has the same * asymptotics but requires O(n) memory, and a {@code PriorityQueue} implementation takes O(n log * k). In benchmarks, this implementation performs at least as well as either implementation, and * degrades more gracefully for worst-case input. * * <p>The implementation does not necessarily use a <i>stable</i> sorting algorithm; when multiple
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 31 13:15:26 UTC 2025 - 11.4K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* weak references. * * <p><strong>Performance</strong> * * <p>The extra bookkeeping done by cycle detecting locks comes at some cost to performance. * Benchmarks (as of December 2011) show that: * * <ul> * <li>for an unnested {@code lock()} and {@code unlock()}, a cycle detecting lock takes 38ns as * opposed to the 24ns taken by a plain lock.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 18 15:05:43 UTC 2025 - 35.9K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
@ParametricNullness static <V extends @Nullable Object, X extends Exception> V getChecked( Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) throws X { // TODO(cpovirk): benchmark a version of this method that accepts a GetCheckedTypeValidator bestGetCheckedTypeValidator().validateClass(exceptionClass); try { return future.get(timeout, unit); } catch (InterruptedException e) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
@ParametricNullness static <V extends @Nullable Object, X extends Exception> V getChecked( Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) throws X { // TODO(cpovirk): benchmark a version of this method that accepts a GetCheckedTypeValidator bestGetCheckedTypeValidator().validateClass(exceptionClass); try { return future.get(timeout, unit); } catch (InterruptedException e) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 10.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/SortedLists.java
checkNotNull(list); checkNotNull(presentBehavior); checkNotNull(absentBehavior); if (!(list instanceof RandomAccess)) { list = new ArrayList<>(list); } // TODO(lowasser): benchmark when it's best to do a linear search int lower = 0; int upper = list.size() - 1; while (lower <= upper) { int middle = (lower + upper) >>> 1;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 10.9K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java
* See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.base; import com.google.caliper.BeforeExperiment; import com.google.caliper.Benchmark; import com.google.caliper.Param; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.jspecify.annotations.NullUnmarked;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 29.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/CompactHashMap.java
* world. Figure out what sort of space-time tradeoff we're actually going to get here with the * *Map variants. This class is particularly hard to benchmark, because the benefit is not only in * less allocation, but also having the GC do less work to scan the heap because of fewer * references, which is particularly hard to quantify. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 39.6K bytes - Viewed (0)