-
Notifications
You must be signed in to change notification settings - Fork 0
/
random.txt
64 lines (64 loc) · 7.97 KB
/
random.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
2023-06-16T17:42:44+08:00
Running ./bin/random
Run on (16 X 3417.59 MHz CPU s)
CPU Caches:
L1 Data 48 KiB (x16)
L1 Instruction 32 KiB (x16)
L2 Unified 2048 KiB (x16)
L3 Unified 30720 KiB (x1)
Load Average: 4.30, 3.92, 2.66
----------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------------------------------------------------------------------------
BenchCRandom 9.66 ns 9.66 ns 71901769
BenchStdRandom<std::minstd_rand0, std::uniform_int_distribution<>> 14.3 ns 14.3 ns 49525632
BenchStdRandom<std::minstd_rand0, std::uniform_real_distribution<>> 42.0 ns 42.0 ns 16706024
BenchStdRandom<std::minstd_rand0, std::normal_distribution<>> 133 ns 133 ns 5255657
BenchStdRandom<std::minstd_rand, std::uniform_int_distribution<>> 14.3 ns 14.3 ns 49391802
BenchStdRandom<std::minstd_rand, std::uniform_real_distribution<>> 41.5 ns 41.5 ns 16856499
BenchStdRandom<std::minstd_rand, std::normal_distribution<>> 130 ns 130 ns 5405036
BenchStdRandom<std::mt19937, std::uniform_int_distribution<>> 2.58 ns 2.58 ns 273745209
BenchStdRandom<std::mt19937, std::uniform_real_distribution<>> 42.9 ns 42.9 ns 16295941
BenchStdRandom<std::mt19937, std::normal_distribution<>> 136 ns 136 ns 5226133
BenchStdRandom<std::mt19937_64, std::uniform_int_distribution<>> 1.58 ns 1.58 ns 483355585
BenchStdRandom<std::mt19937_64, std::uniform_real_distribution<>> 41.8 ns 41.8 ns 16771166
BenchStdRandom<std::mt19937_64, std::normal_distribution<>> 128 ns 128 ns 5432979
BenchStdRandom<pcg32_fast, std::uniform_int_distribution<>> 0.614 ns 0.615 ns 1000000000
BenchStdRandom<pcg32_fast, std::uniform_real_distribution<>> 42.7 ns 42.7 ns 16509420
BenchStdRandom<pcg32_fast, std::normal_distribution<>> 129 ns 129 ns 5413088
BenchStdRandom<pcg64_fast, std::uniform_int_distribution<>> 0.792 ns 0.792 ns 878818477
BenchStdRandom<pcg64_fast, std::uniform_real_distribution<>> 42.0 ns 42.0 ns 16698155
BenchStdRandom<pcg64_fast, std::normal_distribution<>> 126 ns 126 ns 5589331
BenchBoostRandom<boost::minstd_rand0, boost::random::uniform_int_distribution<>> 11.0 ns 11.0 ns 63996217
BenchBoostRandom<boost::minstd_rand0, boost::random::uniform_real_distribution<>> 2.41 ns 2.41 ns 288710387
BenchBoostRandom<boost::minstd_rand0, boost::random::normal_distribution<>> 29.2 ns 29.2 ns 23866206
BenchBoostRandom<boost::minstd_rand, boost::random::uniform_int_distribution<>> 10.8 ns 10.8 ns 64643418
BenchBoostRandom<boost::minstd_rand, boost::random::uniform_real_distribution<>> 2.41 ns 2.41 ns 292079389
BenchBoostRandom<boost::minstd_rand, boost::random::normal_distribution<>> 29.6 ns 29.6 ns 23710910
BenchBoostRandom<boost::mt19937, boost::random::uniform_int_distribution<>> 1.62 ns 1.62 ns 430154845
BenchBoostRandom<boost::mt19937, boost::random::uniform_real_distribution<>> 2.08 ns 2.08 ns 334115502
BenchBoostRandom<boost::mt19937, boost::random::normal_distribution<>> 6.95 ns 6.95 ns 101647706
BenchBoostRandom<boost::mt19937_64, boost::random::uniform_int_distribution<>> 1.06 ns 1.06 ns 661728621
BenchBoostRandom<boost::mt19937_64, boost::random::uniform_real_distribution<>> 2.52 ns 2.52 ns 277852501
BenchBoostRandom<boost::mt19937_64, boost::random::normal_distribution<>> 3.05 ns 3.05 ns 224832381
BenchBoostRandom<boost::mt11213b, boost::random::uniform_int_distribution<>> 1.60 ns 1.60 ns 433148037
BenchBoostRandom<boost::mt11213b, boost::random::uniform_real_distribution<>> 2.06 ns 2.06 ns 335703741
BenchBoostRandom<boost::mt11213b, boost::random::normal_distribution<>> 6.89 ns 6.89 ns 100492505
BenchAbRandom<absl::random_internal::pcg32_2018_engine, absl::uniform_int_distribution<>> 0.809 ns 0.809 ns 858202257
BenchAbRandom<absl::random_internal::pcg32_2018_engine, absl::uniform_real_distribution<>> 1.92 ns 1.92 ns 367046943
BenchAbRandom<absl::random_internal::pcg32_2018_engine, absl::log_uniform_int_distribution<>> 3.27 ns 3.27 ns 215803795
BenchAbRandom<absl::random_internal::pcg64_2018_engine, absl::uniform_int_distribution<>> 1.09 ns 1.09 ns 639622116
BenchAbRandom<absl::random_internal::pcg64_2018_engine, absl::uniform_real_distribution<>> 1.41 ns 1.41 ns 488702845
BenchAbRandom<absl::random_internal::pcg64_2018_engine, absl::log_uniform_int_distribution<>> 3.90 ns 3.90 ns 178838171
BenchAbRandom<absl::random_internal::randen_engine<uint32_t>, absl::uniform_int_distribution<>> 1.89 ns 1.89 ns 369451367
BenchAbRandom<absl::random_internal::randen_engine<uint32_t>, absl::uniform_real_distribution<>> 3.36 ns 3.36 ns 218066660
BenchAbRandom<absl::random_internal::randen_engine<uint32_t>, absl::log_uniform_int_distribution<>> 12.8 ns 12.8 ns 54808123
BenchAbRandom<absl::random_internal::randen_engine<uint64_t>, absl::uniform_int_distribution<>> 2.52 ns 2.52 ns 275989144
BenchAbRandom<absl::random_internal::randen_engine<uint64_t>, absl::uniform_real_distribution<>> 2.14 ns 2.14 ns 321225658
BenchAbRandom<absl::random_internal::randen_engine<uint64_t>, absl::log_uniform_int_distribution<>> 13.7 ns 13.7 ns 51298624
BenchAbRandom<pcg32_fast, absl::uniform_int_distribution<>> 0.616 ns 0.616 ns 1000000000
BenchAbRandom<pcg32_fast, absl::uniform_real_distribution<>> 1.45 ns 1.45 ns 487433939
BenchAbRandom<pcg32_fast, absl::log_uniform_int_distribution<>> 3.00 ns 3.00 ns 235215300
BenchAbRandom<pcg64_fast, absl::uniform_int_distribution<>> 0.879 ns 0.879 ns 822874278
BenchAbRandom<pcg64_fast, absl::uniform_real_distribution<>> 1.23 ns 1.23 ns 585610979
BenchAbRandom<pcg64_fast, absl::log_uniform_int_distribution<>> 3.58 ns 3.58 ns 194899584