You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
9 months ago | |
---|---|---|
.gitignore | 9 months ago | |
README.adoc | 9 months ago | |
composer.json | 9 months ago | |
test.php | 9 months ago |
README.adoc
= Random polyfill performance
All tests were run on PHP 7.4 except for native.
== getInt(0, 65535)
[%header,cols="3,2,2,2,2,2"]
|===
|Env
|MT
|MT (legacy)
|Secure
|PCG
|xoshiro256**
|Native (PHP 8.2)
|0.1860
|0.1731
|2.5280
|0.1879
|0.1791
|GMP
|61.4810
|52.3708
|15.5489
|51.1160
|55.7959
|brick/math + GMP
|680.0640
|544.2760
|15.9061
|552.4859
|747.3629
|brick/math + bcmath
|3597.6019
|3243.9330
|14.3719
|5762.5852
|8369.9131
|brick/math
|2706.6810
|2405.2248
|14.2810
|665554.69*
|148175.72*
|===
+*+ approximately, I used 100 iterations, then multipiled by 100
== nextInt()
[%header,cols="3,2,2,2,2,2"]
|===
|Env
|MT
|MT (legacy)
|Secure
|PCG
|xoshiro256**
|Native (PHP 8.2)
|0.1109
|0.1099
|2.4838
|0.1061
|0.1271
|GMP
|40.9720
|41.6300
|19.0270
|37.4460
|42.7251
|brick/math + GMP
|526.6640
|530.4639
|80.7271
|415.9460
|610.4870
|brick/math + bcmath
|3252.0561
|3229.5029
|323.1668
|5249.2309
|8450.3100
|brick/math
|2383.1699
|2419.9281
|1266.5899
|718118.50*
|149826.31*
|===
+*+ approximately, I used 100 iterations, then multipiled by 100