Hide Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+960,034 data
+1 +10 +100 +1K +10K +MAX
range: 1-100, data points: 960,035, groups: 87
High / Low / Range / Average
Frequency: 9,866 / 9,372 / 494 / 9,600.35
Rows: 3 / 1 / 2 / 1.15
Frequency
Rows
9,866
1
9,776
1
9,766
1
9,765
1
9,753
1
9,752
1
9,749
2
9,734
1
9,732
1
9,723
1
9,721
2
9,719
1
9,717
1
9,708
1
9,705
1
9,704
1
9,699
1
9,694
1
9,691
1
9,684
1
9,677
1
9,675
1
9,660
1
9,658
1
9,655
1
9,651
1
9,650
1
9,647
1
9,644
1
9,638
1
9,636
1
9,634
1
9,631
1
9,624
1
9,622
1
9,621
1
9,618
2
9,615
1
9,614
1
9,610
1
9,608
1
9,603
1
9,602
1
9,599
1
9,598
1
9,592
1
9,590
1
9,588
1
9,586
1
9,584
1
9,581
2
9,580
1
9,579
1
9,574
1
9,572
1
9,569
1
9,568
1
9,566
1
9,563
1
9,562
1
9,560
1
9,559
2
9,558
1
9,556
1
9,553
2
9,552
1
9,549
1
9,535
1
9,534
3
9,528
3
9,523
1
9,521
3
9,509
1
9,500
2
9,498
1
9,496
1
9,489
1
9,483
1
9,471
1
9,470
1
9,467
1
9,463
1
9,456
1
9,436
1
9,433
1
9,415
1
9,372
1

Test runs: 960,035Avg run : 0.000001 seconds Test time: 1.423125 seconds Data Save: 0.117842 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