10'000 iterations with pecl-uuid: 1.0.3+
, rhumsaa/uuid: 2.8
and ramsey/uuid: 3.0
implementations.
$ pecl install uuid
$ melody run uuid-benchmark.php
# no melody overhead for profiling
$ composer install && php uuid-benchmark.php
Results of benchmark:
PECL | 0.0360 sec/10000 | 0.0000036 sec/one
RHUMSAA | 0.0740 sec/10000 | 0.0000074 sec/one
RAMSEY | 0.1840 sec/10000 | 0.0000184 sec/one
Thanks for putting this together.
This is interesting, since 3.0 should be using pecl/uuid, if it's present. Do you have any call grind data from your tests that we can use to identify the bottlenecks? If not, I'll try to replicate your tests this weekend and get that data for analysis.