php-src/ext/tidy
Dmitry Stogov 90b7bde615 Use more compact representation for packed arrays.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
  instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
  familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
  (ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
  (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
  ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
    - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
    - zend_hash_sort_ex() may require converting packed arrays to hash.
2021-11-03 15:18:26 +03:00
..
tests Skip some tests under --preload 2021-07-30 17:26:39 +02:00
config.m4 [skip ci] Fix comment in Tidy autoconf file 2020-04-19 15:53:06 +02:00
config.w32 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-09 19:15:11 +01:00
CREDITS
php_tidy.def Fix libtidy exports when ext/tidy compiled static 2018-12-09 18:59:05 +01:00
php_tidy.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
tidy.c Use more compact representation for packed arrays. 2021-11-03 15:18:26 +03:00
tidy.stub.php Declare tentative return types for ext/tidy 2021-05-25 19:18:58 +02:00
tidy_arginfo.h Declare tentative return types for ext/tidy 2021-05-25 19:18:58 +02:00