FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Experimental support for JSON serialization with `simdjson` by michael-grunder · Pull Request #2814 · phpredis/phpredis · GitHub

Experimental support for JSON serialization with simdjson - #2814

Draft
michael-grunder wants to merge 1 commit into
developfrom
simdjson
Draft

Experimental support for JSON serialization with simdjson#2814
michael-grunder wants to merge 1 commit into
developfrom
simdjson

Conversation

Copy link
Copy Markdown
Member

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:

$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).

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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL