Same file inline optimization #6291
Labels
Category: Core
Related to internal functionality
Performance
Type: Optimization
Improves performance and/or reduces resource usage
Description
OPcache is able to perform certain inline and static linking optimisations when linking functions within the same script. This can offer performance gains in some cases.
However, this kind of optimisation is not possible when functions are declared in different files. This is because OPcache cannot assume that the same files will be loaded in all requests, so it can't statically link them.
Placing performance-sensitive code inline, or at least within the same
.php
file, may enable certain kinds of performance optimisations that are otherwise impossible.I'm not sure where in the current codebase we might benefit from this knowledge. However, it's probably worth investigating.
Justification
Moar performance
Alternative methods
The text was updated successfully, but these errors were encountered: