mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-23 01:35:43 +00:00
0a784e8f94
This commit adds conditional support for simdjson based JSON
deserialization.
To enable compile with `--enable-redis-simdjson` and PhpRedis will
attempt to find and link with the `simdjson` shared library. The feature
likely requires simdjson >= `4.0.0` and was tested with `4.3.1`.
Enabling is just like other serializers:
```php
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_SIMDJSON);
$redis->set('foo', ['bar' => 'baz']);
print_r($redis->get('foo'));
```
Initial tests do show aa huge performance improvement in deserializing
json payloads (2-3.5x depending on the payloads themselves).