Hide Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+881,127 data
+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 881,128, groups: 152
High / Low / Range / Average
Frequency: 1,006 / 783 / 223 / 881.13
Rows: 21 / 1 / 20 / 6.58
Frequency
Rows
1,006
1
974
1
973
1
971
1
970
1
968
1
964
1
960
3
958
1
953
2
952
1
950
1
949
4
948
1
946
2
945
3
943
1
940
2
939
4
938
2
937
4
935
4
934
4
933
1
932
2
931
2
930
3
929
3
928
4
927
3
926
4
924
3
923
4
922
1
921
4
920
5
919
4
918
7
917
10
916
4
915
10
914
5
913
7
912
7
911
13
910
6
909
8
908
10
907
7
906
5
905
13
904
9
903
10
902
15
901
13
900
9
899
12
898
10
897
15
896
14
895
5
894
13
893
16
892
11
891
15
890
14
889
11
888
11
887
11
886
15
885
12
884
13
883
14
882
14
881
14
880
16
879
14
878
17
877
17
876
17
875
17
874
14
873
12
872
15
871
10
870
21
869
14
868
13
867
14
866
14
865
11
864
12
863
5
862
8
861
14
860
7
859
11
858
9
857
9
856
5
855
7
854
16
853
9
852
9
851
8
850
8
849
9
848
7
847
9
846
3
845
4
844
2
843
4
842
6
841
2
840
6
839
2
838
9
837
3
836
3
835
4
834
2
833
6
832
2
831
3
829
2
828
1
827
3
826
2
825
2
824
2
823
1
822
2
821
3
820
2
819
1
817
3
815
1
814
1
813
2
812
2
811
2
809
1
808
1
807
2
806
1
803
1
801
2
800
1
793
1
789
1
783
1

Test runs: 881,128Avg run : 0.000002 seconds Test time: 1.429393 seconds Data Save: 0.246569 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