Show Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+908,941 data
+1 +10 +100 +1K +10K +MAX
range: 1-100, data points: 908,942, groups: 91
High / Low / Range / Average
Frequency: 9,375 / 8,825 / 550 / 9,089.42
Rows: 2 / 1 / 1 / 1.10
Frequency
Rows
9,375
1
9,336
1
9,302
1
9,298
1
9,289
1
9,242
1
9,213
1
9,212
1
9,211
1
9,209
1
9,206
1
9,205
1
9,193
1
9,188
1
9,182
1
9,181
1
9,177
1
9,175
1
9,168
1
9,167
1
9,164
1
9,163
1
9,158
1
9,156
1
9,154
1
9,151
1
9,150
2
9,149
1
9,148
1
9,147
1
9,139
1
9,137
1
9,131
1
9,129
1
9,124
1
9,123
1
9,120
1
9,119
1
9,116
1
9,115
2
9,110
1
9,107
1
9,098
2
9,090
1
9,089
1
9,088
1
9,080
2
9,079
1
9,078
1
9,077
1
9,075
1
9,070
1
9,069
1
9,065
1
9,061
2
9,056
1
9,054
1
9,047
1
9,042
1
9,041
1
9,037
1
9,031
1
9,028
1
9,027
1
9,024
1
9,021
1
9,019
1
9,015
1
9,013
2
9,012
2
9,010
1
9,009
2
9,008
1
9,006
1
9,005
1
9,004
1
8,992
2
8,991
1
8,984
1
8,981
1
8,976
1
8,975
1
8,974
1
8,971
1
8,966
1
8,963
1
8,952
1
8,945
1
8,926
1
8,924
1
8,825
1

Test runs: 908,942Avg run : 0.000002 seconds Test time: 1.430974 seconds Data Save: 0.195282 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

Show Ads