[php-src] PR #16685: ext/gmp: Improve parsing of parameters

From: Date: Sun, 03 Nov 2024 02:17:39 +0000
Subject: [php-src] PR #16685: ext/gmp: Improve parsing of parameters
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-29490@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/16685 Author: Girgias This PR should be reviewed commit by commit to actually understand what is going on. The basic idea is to create, and use, a custom Fast ZPP specifier to parse arguments into an mpz_ptr structure. To prevent issues with cleaning up, and improve efficiency as recommended by the GMP documentation, we create some module global mpz_ptr that we initialize and clean once that we can use during ZPP, without needing to worry about clean-up. This new model greatly simplifies the extension and how to handle parameters, as they will always be mpz_ptr structures. The first couple of commits are some fixes and preliminary refactorings, the main one being to convert all relevant calls to Fast ZPP. I have not benchmarked this, but I would not be surprised if this improves performance of the extension.

« previous php.git-pulls (#29490) next »