[php-src] Issue #21493: Question About Clone Performance in Php8.5
| From: | oleibman | Date: | Sun, 22 Mar 2026 20:12:36 +0000 |
| Subject: | [php-src] Issue #21493: Question About Clone Performance in Php8.5 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251831@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/21493
Author: oleibman
### Description
This is a question, not an issue, but I didn't see a different way to ask. We have been running
some benchmarks to test the performance of cloning a fairly large object vs. serialize/unserialize.
On Win11, we see the surprising result that 8.5 clone runs in about 25-30% of the time that it takes
for Php8.1/2/3/4. We didn't expect, and don't see, a significant change in
serialize/unserialize. We are, of course, happy with this result, but somewhat puzzled. There
doesn't seem to be anything in the change log which suggests that such an improvement is part
of 8.5. Did I miss something there? Is there a change that didn't make it to the log? Is our
application just lucky in this respect? I can provide more details if you need them.
### PHP Version
```plain
PHP 8.5.0 (cli) (built: Nov 18 2025 08:17:59) (ZTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.5.0, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0, Copyright (c), by Zend Technologies
```
### Operating System
Windows 11