Show Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+677,187 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 677,188, groups: 153
High / Low / Range / Average
Frequency: 1,499 / 0 / 1,499 / 67.72
Rows: 9,500 / 1 / 9,499 / 65.36
Frequency
Rows
1,499
1
1,477
1
1,463
1
1,445
1
1,444
1
1,442
3
1,441
2
1,437
1
1,436
1
1,435
1
1,434
1
1,432
1
1,431
1
1,430
2
1,429
1
1,427
2
1,425
1
1,423
1
1,420
1
1,419
1
1,418
2
1,415
3
1,414
3
1,413
1
1,412
2
1,411
1
1,410
1
1,409
1
1,406
2
1,405
2
1,404
1
1,403
7
1,401
3
1,400
6
1,399
1
1,398
3
1,397
3
1,396
3
1,395
8
1,394
5
1,393
3
1,392
6
1,391
2
1,389
2
1,388
2
1,387
3
1,386
1
1,385
2
1,384
4
1,383
3
1,382
6
1,381
6
1,380
2
1,379
3
1,378
4
1,377
8
1,376
2
1,375
3
1,374
3
1,373
4
1,372
4
1,371
1
1,370
5
1,369
3
1,368
6
1,367
3
1,366
7
1,365
4
1,364
5
1,363
7
1,362
7
1,361
6
1,360
6
1,359
5
1,358
4
1,357
5
1,356
7
1,355
6
1,354
8
1,353
4
1,352
4
1,351
5
1,350
3
1,349
9
1,348
10
1,347
1
1,346
6
1,345
3
1,344
10
1,343
10
1,342
3
1,341
5
1,340
2
1,339
3
1,338
6
1,337
3
1,336
6
1,335
4
1,334
7
1,333
6
1,332
3
1,331
3
1,330
3
1,329
1
1,328
1
1,327
7
1,326
5
1,325
10
1,324
6
1,323
3
1,322
4
1,321
2
1,320
2
1,319
2
1,318
5
1,317
1
1,316
2
1,315
4
1,314
2
1,313
3
1,311
6
1,310
2
1,309
1
1,308
5
1,307
3
1,305
2
1,304
4
1,303
2
1,302
2
1,301
2
1,300
3
1,299
6
1,297
2
1,296
3
1,295
2
1,293
3
1,291
1
1,290
1
1,289
1
1,287
3
1,285
2
1,284
1
1,283
2
1,282
2
1,280
1
1,278
2
1,274
1
1,269
1
1,265
1
1,263
1
1,255
1
1,237
1
0
9,500

Test runs: 677,188Avg run : 0.000002 seconds Test time: 1.430093 seconds Data Save: 0.196669 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 500.

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

Show Ads