gen.cc revision 0ab2e892
10ab2e892SShuo Chen#include <stdio.h>
20ab2e892SShuo Chen#include <random>
30ab2e892SShuo Chen
40ab2e892SShuo Chen// generate a 10G input of 1B entries (472M unique), top entries are:
50ab2e892SShuo Chen/*
60ab2e892SShuo Chen31      3209505773
70ab2e892SShuo Chen29      2131583786
80ab2e892SShuo Chen29      2912700161
90ab2e892SShuo Chen29      494155588
100ab2e892SShuo Chen29      244318914
110ab2e892SShuo Chen29      3795640459
120ab2e892SShuo Chen29      3736353633
130ab2e892SShuo Chen29      3792368229
140ab2e892SShuo Chen28      2134003008
150ab2e892SShuo Chen28      3755101979
160ab2e892SShuo Chen28      2615920895
170ab2e892SShuo Chen28      4103497323
180ab2e892SShuo Chen28      124613411
190ab2e892SShuo Chen28      3877714427
200ab2e892SShuo Chen*/
210ab2e892SShuo Chenint main()
220ab2e892SShuo Chen{
230ab2e892SShuo Chen  int iter = 0;
240ab2e892SShuo Chen  for (int x = 500 * 1000 * 1000; x > 0; x /= 2)
250ab2e892SShuo Chen  {
260ab2e892SShuo Chen    std::mt19937 gen(43);
270ab2e892SShuo Chen    for (int i = 0; i < x; ++i)
280ab2e892SShuo Chen      printf("%lu\n", gen());
290ab2e892SShuo Chen    ++iter;
300ab2e892SShuo Chen  }
310ab2e892SShuo Chen  printf("%d\n", iter);
320ab2e892SShuo Chen}
33