2 seconds in my old AMD (4.4 GHz) CPUs.. before and after local
compilation, with perf record getting samples at the same frequency.
(c)rafaeldtinoco@groovy:~$ sudo perf report --stdio
# Overhead Command Shared Object Symbol
# ........ ....... .................
.................................................
#
73.54% php php7.4 [.] php_base64_decode_ex
21.96% php php7.4 [.] php_base64_encode
1.07% php php7.4 [.] execute_ex
and if you annotate it:
https://paste.ubuntu.com/p/Qb9rvT84MX/
you're basically expending almost 75% of the time in decoding base64:
https://pastebin.ubuntu.com/p/YFcqrqfZBm/
but there isn't a single bottleneck, suggesting overall optimizations at
compilation time, SPECIALLY if you judge the source code and generated
instructions (by disassembling php_base64_decode_ex).
A bit amount of time (from these 75%) is in between the branches from
line 274 <-> 264.. suggesting that lots of unknown chars are hitting
continue; (~10% of 75%). Another considerable source of time is the bit
shifts (~8% of the 75%).
next step here is *likely* doing a "perf diff" among the 2 different
reports and it will show the main deviations from the 2 executions..
then you will have to identify:
- is the compiler putting a diff subset of instructions (like SIMD for vectors,
usually using vectorization HW extensions/instructions - sse for x64 for
example)
- is the compiler just doing better loop generation for the decoding ? (usually
related to better intermediate code generation because of a specific flag)
etc...
this is the TODO here.
** Changed in: php7.4 (Ubuntu)
Status: New => Triaged
** Changed in: php7.4 (Ubuntu)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1882279
Title:
PHP built from source performs much better than the Ubuntu packaged
version
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php7.4/+bug/1882279/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs