Get support for ramsey/uuid-benchmark
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
ramsey/uuid-benchmark
ramsey/uuid Benchmark Tests
Tip of the hat to @jaymecd for creating the initial script and benchmark tests to bring attention to performance drops between ramsey/uuid releases.
Also, refer to ramsey/uuid#56.
Get set up for the benchmarks
Some useful setup (using phpbrew):
phpbrew install next as php-7.0.0-dev
phpbrew use php-7.0.0-dev
wget http://pecl.php.net/get/uuid-1.0.4.tgz && tar zxf uuid-1.0.4.tgz && cd uuid-1.0.4/
phpize && ./configure && make && make install
phpbrew config # Add the line "extension=uuid.so" to the config and save
Now get the benchmark scripts and install dependencies with Composer:
git clone https://github.com/ramsey/uuid-benchmark.git
cd uuid-benchmark/
composer install
Run the benchmarks
cd uuid-benchmark/
phpbrew use php-7.0.0-dev
php uuid-benchmark.php
You'll see output that looks like this:
PECL | 0.0280 sec/10000 | 0.0000028 sec/one
RHUMSAA | 0.0400 sec/10000 | 0.0000040 sec/one
RAMSEY-PECL | 0.1630 sec/10000 | 0.0000163 sec/one
RAMSEY-NOPECL | 0.0960 sec/10000 | 0.0000096 sec/one
RAMSEY-RANDOMLIB | 100.5020 sec/10000 | 0.0100502 sec/one
RAMSEY-PHP7 | 0.1040 sec/10000 | 0.0000104 sec/one
Now what?
We need to figure out what this means for the ramsey/uuid library. Different projects have different needs, and some need to generate a lot of UUIDs quickly, which means ramsey/uuid might not provide the best solution, but are there ways we can improve performance without sacrificing the flexibility provided by the library? What are they?
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2