Did you notice that php-redis is taking about 3ms in get or set operations? (PHP 7.1)
$redis->set();
PHP 5.6 -> 1ms
$redis->set();
PHP 7.1 -> 3ms
Are you sure it is depends on PHP version and not environment?
I agree with @yatsukhnenko that it seems more related to environment than PHP version. I did a very simple test with a few versions of PHP and don't see any real difference between 5.x and 7.x. My results are far faster than 1ms per call, but I'm doing all tests locally.
First of all, thank you for your attention.
I did the tests using the same environment.
Just change the php version installed I could see very different times.
My test was in production (aws):
Both using nginx + php-fpm
PS. correcting the versions:
@btrazzini 3.1.1 was released more than year ago. Could you test the latest stable version?
Testing a newer version is a good idea, but I don't think this is really a bug:
Here's averaged GET timings across a bunch of versions of PHP:
PHP 5.6.30 : Sent 5000 GET commands in 95.88 ms
PHP 7.0.17 : Sent 5000 GET commands in 84.61 ms
PHP 7.0.18 : Sent 5000 GET commands in 86.72 ms
PHP 7.1.3 : Sent 5000 GET commands in 87.52 ms
PHP 7.1.5 : Sent 5000 GET commands in 83.53 ms
PHP 7.1.7 : Sent 5000 GET commands in 86.45 ms
PHP 7.1.10 : Sent 5000 GET commands in 99.99 ms
PHP 7.2.6 : Sent 5000 GET commands in 82.65 ms
These are average timings and will still vary a bit run to run, depending on what else is happening on my system. That said, I don't see anything like a 3x difference between any version of php.
@btrazzini 3ms is really good result comparing to @michael-grunder's ~90ms :smile:
Most helpful comment
Testing a newer version is a good idea, but I don't think this is really a bug:
Here's averaged GET timings across a bunch of versions of PHP:
These are average timings and will still vary a bit run to run, depending on what else is happening on my system. That said, I don't see anything like a 3x difference between any version of php.