[php-src] PR #17305: Implement slow GD test helpers in C
| From: | cmb69 | Date: | Mon, 30 Dec 2024 16:29:50 +0000 |
| Subject: | [php-src] PR #17305: Implement slow GD test helpers in C | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-30168@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/17305
Author: cmb69
There are two test helpers which need to traverse all pixels of the given images, what is obviously
rather slow in PHP. To avoid that performance penalty, we implement the functions in C and make
them available as internal PHP functions, but only if
GD_TEST_HELPERS is defined when
building. We still keep the PHP implementations as fall- back in case someone wants to run the
tests without the internal functions being defined.
We also improve the userland functions by traversing the pixels in Z order what is more cache
efficient for the libgd implementation.
---
TODO:
- [ ] use internal functions for all CI jobs?
- [ ] choose better names (maybe prefix with gd_test_