Align _zend_array struct with 64 bytes?
Open
Nobody has claimed this yet.
Bug
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
https://github.com/php/php-src/blob/8cc6b3576e93f3d30ad52640ed74256734a9e6d8/Zend/zend_types.h#L388
The _zend_array struct occupies 56 bytes. Should we align it with 64 bytes? This alignment might offer greater cache line optimization and potentially enhance performance.
PHP Version
master
Operating System
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the _zend_array definition in Zend/zend_types.h at the linked line and understand its current 56-byte layout. Establish whether changing its alignment to 64 bytes improves performance, then document measurements and a clear recommendation or implementation outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100