Show Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+1,712,511 data
+1 +10 +100 +1K +10K +MAX
range: 1-10,000, data points: 1,712,512, groups: 93
High / Low / Range / Average
Frequency: 237 / 126 / 111 / 171.25
Rows: 327 / 1 / 326 / 107.53
Frequency
Rows
237
1
228
1
220
2
219
1
217
1
216
1
215
2
214
1
213
2
212
1
211
5
210
9
209
5
208
10
207
11
206
8
205
11
204
9
203
11
202
21
201
26
200
23
199
34
198
33
197
42
196
46
195
59
194
69
193
85
192
73
191
98
190
104
189
115
188
141
187
163
186
129
185
173
184
207
183
197
182
211
181
230
180
243
179
219
178
289
177
265
176
270
175
277
174
270
173
291
172
303
171
327
170
288
169
327
168
319
167
326
166
298
165
278
164
243
163
258
162
254
161
238
160
225
159
230
158
181
157
163
156
176
155
144
154
120
153
110
152
102
151
92
150
83
149
71
148
63
147
49
146
39
145
33
144
29
143
26
142
27
141
15
140
13
139
11
138
11
137
3
136
5
135
12
134
2
133
5
132
2
129
2
128
1
126
1

Test runs: 1,712,512Avg run : 0.000001 seconds Test time: 1.411974 seconds Data Save: 0.447140 seconds Test Tools: Restart test: Random range 1 to: 1 2 3 4 5 10 50 100 500 1K 5K 10K 50K 100K Random Generator Method: SQLite ORDER BY RANDOM() PHP rand() PHP mt_rand() PHP random_int() Back to top


About the Randomosity Tester

This page tests the frequency distribution and timing of random number generation via these methods:

Random number results are stored in a test table. The test table is defined as:

CREATE TABLE 'test' ( 'id' INTEGER PRIMARY KEY, 'frequency' INTEGER DEFAULT '0' );

The table is initialized by creating all rows with frequency = 0. The number of rows in the table is defined by the range setting. The current test is set to use range: 1 to 10,000.

For each random number chosen, the table is updated via:

UPDATE test SET frequency = frequency + 1 WHERE id = :random_number

For SQLite tests, results are individually generated via the SQL call:

SELECT id FROM test ORDER BY RANDOM() LIMIT 1;

Generate more random numbers by clicking a  +  number button to start a test run.

Each test run is limted to ~1.42 seconds.

A Frequency of Frequencies chart displays:

This site was created with Open Source software. Find out more on Github: randomosity-tester v0.2.2

Back to top

Show Ads