This slightly helps performance of apc.serializer=default when there are lots of small strings to unpersist. (and reduces size of serialized data (and cache entry keys) by 8 bytes with other serializers (16 bytes per entry))
With APCu's current design and eviction always being a possibility, strings must always be copied.
(zval flags could be used to check the type if that stopped being the case)
For example, fetching a large array mapping small strings to small strings (CPU running at 2.5GHz):
Related to #323
This slightly helps performance of
apc.serializer=default
when there are lots of small strings to unpersist. (and reduces size of serialized data (and cache entry keys) by 8 bytes with other serializers (16 bytes per entry))With APCu's current design and eviction always being a possibility, strings must always be copied. (zval flags could be used to check the type if that stopped being the case)
For example, fetching a large array mapping small strings to small strings (CPU running at 2.5GHz):
Benchmark source code (click to expand)
```php