Released some updates for the PKD reference implementations
I also confirmed that this breaks the duvet traces: https://github.com/fedi-e2ee/pkd-formal/actions/runs/21503512852/job/61954656342
(I'll fix that in the morning.)
These changes should actually improve performance.
That might sound weird. "Why would use function and comments make things faster?"
Actually, nevermind: Fixing the duvet stuff seems straightforward.
https://github.com/fedi-e2ee/pkd-formal/releases/tag/v0.2.0
evil laugh It's aliiiiive
The goal being to prevent accidental/malicious shadowing of core namespace functions?
The speedup thing is a nice bonus, though :3 I had no idea PHP had execution shortcuts for a bunch of its core functions.
I was originally thinking the speedup ParagonIE was showing was just due to avoiding vtable lookups and was suspicious about how much time was saved lol.
(For those interested, [0] has a good discussion about such "compiler optimized functions" and why you can save so much time. [1] goes a bit deeper.)
[0]: https://tideways.com/profiler/blog/compiler-optimized-php-functions
[1]: https://tideways.com/profiler/blog/we-tried-backslashing-all-the-functions
@soatok
... I also just noticed that in pkd-server-php, every function gets its own `use function` statement, versus pkd-crypto and pkd-client-php, which just use a list of function names.
I'd be happy to spin up a PR to change these over, if it's something that matters to you at all. It tickles my OCD, but ultimately is a nonissue ^^;
@indig0 Yeah, I need to clean it up and be more consistent. I was trying to write a php-cs-fixer custom rule but got distracted.