Hide Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+568,425 data
+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 568,802, groups: 120
High / Low / Range / Average
Frequency: 639 / 490 / 149 / 568.80
Rows: 22 / 1 / 21 / 8.33
Frequency
Rows
639
1
637
1
636
1
634
1
629
4
628
1
627
1
626
1
625
1
624
3
623
1
621
1
620
2
619
1
618
5
617
5
616
3
615
1
614
2
613
3
612
3
611
1
610
4
609
11
608
6
607
9
606
5
605
6
604
10
603
1
602
1
601
6
600
13
599
7
598
8
597
10
596
11
595
8
594
14
593
6
592
5
591
14
590
8
589
11
588
7
587
10
586
7
585
10
584
9
583
15
582
19
581
17
580
10
579
14
578
20
577
13
576
13
575
17
574
13
573
15
572
16
571
22
570
13
569
17
568
13
567
12
566
18
565
21
564
11
563
12
562
15
561
19
560
17
559
17
558
20
557
12
556
20
555
13
554
13
553
14
552
7
551
13
550
11
549
13
548
14
547
7
546
17
545
11
544
10
543
9
542
11
541
12
540
8
539
11
538
11
537
7
536
7
535
5
534
6
533
2
532
10
531
7
530
7
529
5
528
4
527
6
525
2
524
3
523
5
522
2
521
2
520
1
519
3
518
1
517
3
516
2
515
1
512
1
502
1
490
1

Test runs: 568,426Avg run : 0.000003 seconds Test time: 1.424767 seconds Data Save: 0.244467 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