Company
Date Published
Author
Aerospike Engineering
Word count
1189
Language
English
Hacker News points
None

Summary

The Aerospike PHP Client is built on top of the Aerospike C Client as an extension for PHP. The main focus of PHP 7 is to optimize the structure that represents a variable in PHP—Zend values (zvals). In PHP 7, zvals are not heap allocated and no longer store a refcount. Instead, the refcount is stored by any complex values the zval points to. This results in significant performance improvements, as storing refcount in the values themselves allows them to be shared independently of the zval structure. The Aerospike PHP Client was benchmarked using the multi-process script (rw-worker.php) with different read/write ratios, four workers, and 100,000 iterations. The test showed that PHP 7 outperforms PHP 5 in terms of total execution time, combined throughput, time spent inside each operation, and memory consumption. The performance improvements are due to significant memory savings, thanks to the new zval representation and hash table implementation in PHP 7.