Hide Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+1,230,383 data
+1 +10 +100 +1K +10K +MAX
range: 1-100, data points: 1,230,384, groups: 86
High / Low / Range / Average
Frequency: 12,586 / 12,031 / 555 / 12,303.84
Rows: 3 / 1 / 2 / 1.16
Frequency
Rows
12,586
1
12,583
1
12,556
1
12,542
1
12,528
1
12,515
1
12,487
1
12,485
1
12,450
1
12,449
1
12,447
1
12,445
1
12,440
1
12,439
1
12,425
1
12,420
1
12,418
1
12,414
1
12,411
1
12,410
1
12,408
1
12,405
1
12,399
1
12,398
1
12,397
1
12,390
1
12,388
3
12,384
1
12,372
1
12,364
1
12,362
1
12,356
1
12,355
1
12,340
2
12,339
1
12,336
2
12,335
1
12,334
1
12,331
2
12,322
1
12,319
1
12,313
1
12,308
1
12,306
1
12,305
1
12,302
1
12,293
1
12,287
2
12,283
1
12,282
1
12,279
1
12,276
1
12,275
1
12,271
2
12,268
1
12,263
1
12,262
1
12,256
1
12,251
2
12,250
2
12,249
1
12,238
2
12,230
1
12,227
1
12,219
1
12,216
1
12,214
2
12,204
2
12,202
1
12,200
1
12,192
1
12,188
1
12,184
1
12,170
2
12,163
2
12,150
1
12,147
1
12,144
1
12,133
1
12,094
1
12,090
1
12,081
1
12,063
1
12,059
1
12,051
1
12,031
1

Test runs: 1,230,384Avg run : 0.000001 seconds Test time: 1.421333 seconds Data Save: 0.183866 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 100.

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


Hide Ads