Hide Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+776,158 data
+1 +10 +100 +1K +10K +MAX
range: 1-100, data points: 776,159, groups: 86
High / Low / Range / Average
Frequency: 8,010 / 7,574 / 436 / 7,761.59
Rows: 3 / 1 / 2 / 1.16
Frequency
Rows
8,010
1
7,945
1
7,944
1
7,940
1
7,920
2
7,896
1
7,872
1
7,871
1
7,868
1
7,864
1
7,858
2
7,846
1
7,845
2
7,842
1
7,840
2
7,834
1
7,833
1
7,830
1
7,828
1
7,826
1
7,825
1
7,821
1
7,818
1
7,816
1
7,815
1
7,813
1
7,812
1
7,805
1
7,801
1
7,800
2
7,799
1
7,789
1
7,783
1
7,782
1
7,781
3
7,778
1
7,774
1
7,771
1
7,770
1
7,767
1
7,765
1
7,764
1
7,758
1
7,753
1
7,752
1
7,746
3
7,743
1
7,737
1
7,736
1
7,735
2
7,732
1
7,730
1
7,725
1
7,723
1
7,721
1
7,720
1
7,718
1
7,716
2
7,711
1
7,706
1
7,704
1
7,703
1
7,702
1
7,701
1
7,698
1
7,695
1
7,687
1
7,686
2
7,684
2
7,683
1
7,677
1
7,676
1
7,674
2
7,673
1
7,671
1
7,670
1
7,655
1
7,648
1
7,645
1
7,644
1
7,631
1
7,624
1
7,617
1
7,606
1
7,596
1
7,574
1

Test runs: 776,159Avg run : 0.000002 seconds Test time: 1.418348 seconds Data Save: 0.167589 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