Add slash before native functions to speed up resolving #1129
No reviewers
Labels
No Label
a11y
ActivityPub
admin
API
backend
bug
community
conflicting
contribution welcome
deployment
documentation
duplicate
enhancement
frontend
good first issue
help wanted
high priority
instance config
low priority
mobile
moderation
more infomation needed
needs feedback
pr pending
project setup
question
search
security
translation
translations update needed
UI/UX
upstream
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kbin/kbin-core#1129
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "szsz/kbin-core:native-function-invocation"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Adding slash before some native functions is a microoptimization that allows the engine to inline them.
It is well explained in an article at https://php.watch/articles/php-zend-engine-special-inlined-functions
and effortlessly enforced in kbin code by change in php-cs-fixer config file
Would like to see actual measurements before and after to be honest. Just curious.
Some benchmarking of adding a topic or a comment. And removing it again. Something like that?
The difference will of course be very small, but since its done automatically and doesn't hurt readability of code I'd say its worth it.
The actual benchmarks of this change are available for example at https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/