// Path: hppc/src/main/java/com/carrotsearch/hppc/XorShift128P.java
// public class XorShift128P {
//   /*
//    * 128 bits of state.
//    */
//   private long state0, state1;
// 
//   public XorShift128P(long seed) {
//     state0 = notZero(BitMixer.mix64(seed));
//     state1 = notZero(BitMixer.mix64(seed + 1));
//   }
// 
//   public XorShift128P() {
//     this(Containers.randomSeed64());
//   }
// 
//   public long nextLong() {
//     long s1 = state0;
//     long s0 = state1;
//     state0 = s0;
//     s1 ^= s1 << 23;
//     return (state1 = (s1 ^ s0 ^ (s1 >>> 17) ^ (s0 >>> 26))) + s0;
//   }
// 
//   public int nextInt() {
//     return (int) nextLong();
//   }
// 
//   private static long notZero(long value) {
//     return value == 0 ? 0xdeadbeefbabeL : value;
//   }
// 
//   public int nextInt(int bound) {
//     if (bound <= 0) {
//       throw new IllegalArgumentException();
//     }
// 
//     int r = (nextInt() >>> 1);
//     int m = bound - 1;
//     if ((bound & m) == 0) {
//       r = (int) ((bound * (long) r) >> 31);
//     } else {
//       for (int u = r; u - (r = u % bound) + m < 0; u = nextInt() >>> 1) {}
//     }
// 
//     return r;
//   }
// }


import com.carrotsearch.hppc.XorShift128P;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/*
 * HPPC
 *
 * Copyright (C) 2010-2020 Carrot Search s.c.
 * All rights reserved.
 *
 * Refer to the full license file "LICENSE.txt":
 * https://github.com/carrotsearch/hppc/blob/master/LICENSE.txt
 */
package com.carrotsearch.hppc.benchmarks;


@Fork(1)
@Warmup(iterations = 5)
@Measurement(iterations = 5)
@State(Scope.Benchmark)
public class B002_HashSet_Add {
  public static interface Ops {
    Object addAll(int[] keys);
  }

// Path: hppc/src/main/java/com/carrotsearch/hppc/XorShift128P.java
// public class XorShift128P {
//   /*
//    * 128 bits of state.
//    */
//   private long state0, state1;
// 
//   public XorShift128P(long seed) {
//     state0 = notZero(BitMixer.mix64(seed));
//     state1 = notZero(BitMixer.mix64(seed + 1));
//   }
// 
//   public XorShift128P() {
//     this(Containers.randomSeed64());
//   }
// 
//   public long nextLong() {
//     long s1 = state0;
//     long s0 = state1;
//     state0 = s0;
//     s1 ^= s1 << 23;
//     return (state1 = (s1 ^ s0 ^ (s1 >>> 17) ^ (s0 >>> 26))) + s0;
//   }
// 
//   public int nextInt() {
//     return (int) nextLong();
//   }
// 
//   private static long notZero(long value) {
//     return value == 0 ? 0xdeadbeefbabeL : value;
//   }
// 
//   public int nextInt(int bound) {
//     if (bound <= 0) {
//       throw new IllegalArgumentException();
//     }
// 
//     int r = (nextInt() >>> 1);
//     int m = bound - 1;
//     if ((bound & m) == 0) {
//       r = (int) ((bound * (long) r) >> 31);
//     } else {
//       for (int u = r; u - (r = u % bound) + m < 0; u = nextInt() >>> 1) {}
//     }
// 
//     return r;
//   }
// }


// Path: hppc-benchmarks/src/jmh/java/com/carrotsearch/hppc/benchmarks/B002_HashSet_Add.java
import com.carrotsearch.hppc.XorShift128P;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;

/*
 * HPPC
 *
 * Copyright (C) 2010-2020 Carrot Search s.c.
 * All rights reserved.
 *
 * Refer to the full license file "LICENSE.txt":
 * https://github.com/carrotsearch/hppc/blob/master/LICENSE.txt
 */
package com.carrotsearch.hppc.benchmarks;


@Fork(1)
@Warmup(iterations = 5)
@Measurement(iterations = 5)
@State(Scope.Benchmark)
public class B002_HashSet_Add {
  public static interface Ops {
    Object addAll(int[] keys);
  }

  @Param("0.75")