Hide Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+1,544,101 data
+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 771,396, groups: 160
High / Low / Range / Average
Frequency: 1,654 / 1,439 / 215 / 1,542.79
Rows: 11 / 1 / 10 / 3.13
Frequency
Rows
1,654
1
1,638
1
1,637
2
1,636
2
1,626
1
1,624
2
1,623
1
1,622
1
1,621
1
1,620
2
1,619
1
1,616
1
1,615
1
1,613
2
1,612
2
1,611
1
1,610
2
1,609
1
1,608
1
1,607
3
1,605
3
1,604
3
1,603
1
1,602
2
1,601
2
1,600
1
1,599
2
1,597
1
1,596
5
1,595
1
1,594
1
1,593
3
1,592
1
1,591
1
1,590
1
1,589
2
1,588
5
1,587
6
1,586
2
1,585
1
1,584
2
1,583
2
1,582
3
1,580
2
1,579
7
1,578
1
1,577
9
1,576
5
1,575
1
1,574
3
1,573
2
1,572
6
1,571
2
1,570
6
1,569
3
1,568
3
1,567
5
1,566
2
1,565
4
1,564
7
1,563
4
1,562
2
1,561
2
1,560
5
1,559
3
1,558
5
1,557
2
1,556
7
1,555
8
1,554
6
1,552
5
1,551
6
1,550
6
1,549
2
1,548
9
1,547
11
1,546
3
1,545
3
1,544
7
1,543
4
1,542
9
1,541
4
1,540
7
1,539
4
1,538
5
1,537
8
1,536
6
1,535
6
1,534
9
1,533
2
1,532
7
1,531
8
1,530
2
1,529
4
1,528
5
1,527
4
1,526
5
1,525
5
1,524
4
1,523
3
1,522
4
1,521
3
1,520
3
1,519
4
1,518
6
1,517
5
1,516
6
1,515
5
1,514
4
1,513
3
1,512
1
1,511
1
1,510
6
1,509
2
1,508
1
1,507
5
1,506
5
1,505
1
1,504
5
1,503
1
1,502
1
1,501
2
1,500
5
1,499
2
1,498
3
1,497
3
1,496
4
1,495
1
1,494
2
1,492
2
1,491
2
1,489
4
1,488
4
1,486
1
1,485
2
1,484
1
1,483
2
1,482
1
1,480
2
1,479
1
1,478
3
1,477
1
1,475
2
1,474
2
1,471
1
1,470
1
1,469
1
1,468
1
1,465
2
1,463
2
1,460
2
1,459
3
1,454
1
1,453
1
1,451
1
1,447
1
1,444
1
1,442
1
1,441
1
1,439
1

Test runs: 1,544,102Avg run : 0.000001 seconds Test time: 1.399727 seconds Data Save: 0.138766 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 1,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


Hide Ads