NOTE: preserved for performance testing
9215
int firstOneInRange(int from, int to) {
		if (from < 0) throw new IllegalArgumentException();
		if (to < from) throw new IllegalArgumentException();
		from += start;
		to += start;
		if (to > finish) throw new IllegalArgumentException();
		return firstOneInRangeAdj(from, to) - start;
	}
537406
function() {
            if (observed.size) {
                observed.forEach(performPropertyChecks);
                handlers.forEach(deliverHandlerRecords);
                nextFrame(runGlobalLoop);
            }
        }
1084593
function performance() {
  /* eslint prefer-rest-params: 0 */
  const args = Array.from(arguments);
  const interval = get(args, isNumber, 100);
  const fn = get(args, isFunction, noop);
  const unitInfo = convertUnit(get(args, isString, 'B').toUpperCase());
  let start = process.hrtime();
  let cpuUsage = process.cpuUsage && process.cpuUsage();
  const timer = setInterval(() => {
    let result = {
      lag: getDelay(start, interval),
      heap: getHeapStatistics(unitInfo),
      memoryUsage: getMemoryUsage(unitInfo),
    };
    if (cpuUsage) {
      result.cpuUsage = getCpuUsage(cpuUsage, start);
    }
    if (v8.getHeapSpaceStatistics) {
      result.heapSpace = getHeapSpaceStatistics(unitInfo);
    }
    if (performance.flatten) {
      result = flatten(result);
    }
    if (performance.camelCase) {
      result = camelCaseData(result);
    }
    fn(result);
    start = process.hrtime();
    cpuUsage = process.cpuUsage && process.cpuUsage();
  }, interval);
  timer.unref();
  return timer;
}
1346914
@Override
  public void ensureCapacity(int expectedElements) {
    if (expectedElements > resizeAt || keys == null) {
      final KType[] prevKeys = Intrinsics.<KType[]> cast(this.keys);
      allocateBuffers(minBufferSize(expectedElements, loadFactor));
      if (prevKeys != null && !isEmpty()) {
        rehash(prevKeys);
      }
    }
  }
1287618
@Override
    public boolean storeIfAbsent(T key, INDArray object) {
        try {
            if (emulateIsAbsent)
                lock.writeLock().lock();

            if (compressedEntries.containsKey(key)) {
                return false;
            } else {
                store(key, object);
                return true;
            }
        } finally {
            if (emulateIsAbsent)
                lock.writeLock().unlock();
        }
    }
1097789
public void dump() {
        /*
         * Defect 88284
         * Performance hit of creating data structure, which occupies memory
         * even though if the trace is not turned ON. So suppress creation
         * by checking trace and debug flags.
         */
        if (!TraceComponent.isAnyTracingEnabled() || !(tc.isDumpEnabled() ||
                                                       tc.isDebugEnabled())) {
            return;
        }

        introspect(new TrDumpWriter(tc));
    }
20486
public static void assertJsonNotEquals(Object expected, Object fullJson, Configuration configuration) {
        assertJsonPartNotEquals(expected, fullJson, ROOT, configuration);
    }
1190762
function Sustained (obs, timeThreshold, checkUpdateImmediately) {
  var outputValue = Value(obs())
  var lastValue = null
  var timer = null

  return computed(outputValue, v => v, {
    onListen: () => watch(obs, onChange)
  })

  function onChange (value) {
    if (checkUpdateImmediately && checkUpdateImmediately(value)) {
      clearTimeout(timer)
      update()
    } else if (value !== lastValue) {
      clearTimeout(timer)
      var delay = typeof timeThreshold === 'function' ? timeThreshold(value, outputValue()) : timeThreshold
      timer = setTimeout(update, delay)
    }
    lastValue = value
  }

  function update () {
    var value = obs()
    if (value !== outputValue()) {
      outputValue.set(value)
    }
  }
}
664509
function() {
      var timings = {};
      var requests = win.performance.getEntriesByType("resource");
      for (var i = 0; i < requests.length; i++)
        timings[requests[i].name] = requests[i].responseEnd;
      for (var j = 0; j < rects.length; j++) {
        if (!('tm' in rects[j]))
          rects[j].tm = timings[rects[j].url] !== undefined ? timings[rects[j].url] : 0;
      }
    }
845644
void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file) throws IOException, StartException {
        persist(key, value, enableDisableMode, disable, file, null);
    }
611431
void checkRecallValidity() {
    double x0 = recall.exec(this, 0);
    for (int i = 1; i < _nBins; i++) {
      double x1 = recall.exec(this, i);
      if (x0 > x1)
        throw new H2OIllegalArgumentException(String.valueOf(i), "recall", x0 + " > " + x1);
      x0 = x1;
    }
  }
39071
def cache_finite_samples(f):
	''''''
	cache = {}
	def wrap(*args):
		key = FRAME_RATE, args
		if key not in cache:
			cache[key] = [sample for sample in f(*args)]
		return (sample for sample in cache[key])
	return wrap
398473
private void perform(int operation, int position, long bs, int length) {
		checkBitsLength(length);
		position = adjPosition(position);
		checkMutable();
		performAdj(operation, position, bs, length);
	}
508558
@Benchmark
    @OperationsPerInvocation(20)
    public void benchmarkByteBuddyWithProxy(Blackhole blackHole) {
        blackHole.consume(byteBuddyWithProxyInstance.method(booleanValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(byteValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(shortValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(intValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(charValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(intValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(longValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(floatValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(doubleValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(stringValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(booleanValue, booleanValue, booleanValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(byteValue, byteValue, byteValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(shortValue, shortValue, shortValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(intValue, intValue, intValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(charValue, charValue, charValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(intValue, intValue, intValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(longValue, longValue, longValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(floatValue, floatValue, floatValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(doubleValue, doubleValue, doubleValue));
        blackHole.consume(byteBuddyWithProxyInstance.method(stringValue, stringValue, stringValue));
    }
234457
private void recordCompatibilityInfo(JSPrimitive access, JSchema accSchema,
      JSPrimitive encoding, JSchema encSchema) throws JMFSchemaViolationException
  {
    if (access.getTypeCode() == encoding.getTypeCode())
      recordOnePair(access, accSchema, encoding, encSchema);
    else {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JmfTr.debug(this, tc, "Compatibility violation (primitive type mismatch):"
                                             + " access " + access
                                             + ", access TypeCode " + access.getTypeCode()
                                             + ", encoding " + encoding
                                             + ", encoding TypeCode " + encoding.getTypeCode()
                                             );
      violation(access, encoding);
    }
  }
1260471
private void ensureSorted() {
    if (sorted) {
      return;
    }

    ensureCapacity();

    DataUtils.sort(byBlockHash);
    for (int i = 0; i < size; i++) {
      resourceIdsIndex[i] = i;
    }
    DataUtils.sort(byResourceId);

    sorted = true;
  }
515448
private void recordCompatibilityInfo(JMFType access, JSchema accSchema, JMFType encoding,
      JSchema encSchema) throws JMFSchemaViolationException
  {
    if (access instanceof JSPrimitive)
      if (encoding instanceof JSPrimitive)
        recordCompatibilityInfo((JSPrimitive)access, accSchema, (JSPrimitive)encoding,
          encSchema);
      else if (encoding instanceof JSVariant)
        checkForDeletingVariant(access, (JSVariant)encoding, false, accSchema, encSchema);
      else {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JmfTr.debug(this, tc, "Compatibility violation (type mismatch) for JSPrimitive");
        violation(access, encoding);
       }
    else if (access instanceof JSEnum)
      if (encoding instanceof JSEnum)
        recordCompatibilityInfo((JSEnum)access, accSchema, (JSEnum)encoding, encSchema);
      else if (encoding instanceof JSVariant)
        checkForDeletingVariant(access, (JSVariant)encoding, false, accSchema, encSchema);
      else {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JmfTr.debug(this, tc, "Compatibility violation (type mismatch) for JSEnum");
        violation(access, encoding);
      }
    else if (access instanceof JSDynamic)
      if (encoding instanceof JSDynamic)
        recordOnePair((JSField)access, accSchema, (JSField)encoding, encSchema);
      else if (encoding instanceof JSVariant)
        checkForDeletingVariant(access, (JSVariant)encoding, false, accSchema, encSchema);
      else {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JmfTr.debug(this, tc, "Compatibility violation (type mismatch) for JSDynamic");
        violation(access, encoding);
      }
    else if (access instanceof JSRepeated)
      if (encoding instanceof JSRepeated)
        recordCompatibilityInfo(((JSRepeated)access).getItemType(), accSchema,
          ((JSRepeated)encoding).getItemType(), encSchema);
      else if (encoding instanceof JSVariant)
        checkForDeletingVariant(access, (JSVariant)encoding, false, accSchema, encSchema);
      else {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JmfTr.debug(this, tc, "Compatibility violation (type mismatch) for JSRepeated");
        violation(access, encoding);
      }
    else if (access instanceof JSTuple)
      if (encoding instanceof JSTuple)
        recordCompatibilityInfo((JSTuple)access, accSchema, (JSTuple)encoding, encSchema);
      else if (encoding instanceof JSVariant)
        checkForDeletingVariant(access, (JSVariant)encoding, false, accSchema, encSchema);
      else {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JmfTr.debug(this, tc, "Compatibility violation (type mismatch) for JSTuple");
        violation(access, encoding);
      }
    else if (access instanceof JSVariant) {
      JSVariant accVar = (JSVariant)access;
      if (encoding instanceof JSVariant) {
        JSVariant encVar = (JSVariant)encoding;
        recordCompatibilityInfo(accVar, accSchema, encVar, encSchema);
      } else
        checkForDeletingVariant(encoding, accVar, true, accSchema, encSchema);
    }
  }