Bug #81090 [NEW]: Typed property performance degradation with .= operator

From: Date: Sun, 30 May 2021 12:41:01 +0000
Subject: Bug #81090 [NEW]: Typed property performance degradation with .= operator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234099@lists.php.net to get a copy of this message
From: dktapps at pmmp dot io Operating system: Windows PHP version: 7.4.19 Package: Performance problem Bug Type: Bug Bug description:Typed property performance degradation with .= operator Description: ------------ There appears to be a change in the behaviour of .= with typed properties, as compared to typeless properties. The below script demonstrates a significant performance degradation with typed properties (in the ballpark of 2 orders of magnitude). Test script: --------------- https://gist.github.com/dktapps/8a5d839f4c884f92d0b56f04c3b7d7d4 Expected result: ---------------- The time per operation should only be slightly slower for typed properties than typeless properties (like it is for other things, like plain assignments). Actual result: -------------- The time per operation is 2 orders of magnitude worse on the first loop than the second one. On my machine, the script produces the following: Typed property time: 8701.32 ns/op Typeless property time: 211.446 ns/op -- Edit bug report at https://bugs.php.net/bug.php?id=81090&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81090&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81090&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81090&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81090&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81090&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81090&r=support Expected behavior: https://bugs.php.net/fix.php?id=81090&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81090&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81090&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81090&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81090&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81090&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81090&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81090&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81090&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81090&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81090&r=mysqlcfg

« previous php.bugs (#234099) next »