Topic: x64-64 Generation Optimizations or SRPMs

Are there any plans to leverage GCC's x86-64 -march options to build speedier variations of PHP that leverage improvements in CPU extensions since x86-64 was released?

I'm referring to these
x86-64-v2
x86-64-v3
x86-64-v4

Ideally I'm trying to CPU optimize my PHP build as much as possible and I might even want to add PGO to the mix.  Since you're already regularly building PHP and I'd love to just keep using your repos, I thought I'd ask. Are any plans for anything like that?

If not, do you offer any way to download SRPMS for a PHP version so that we can implement those changes in our own builds?

Thanks in advance for any insights you can share.

Re: x64-64 Generation Optimizations or SRPMs

Build options (security, performance...) are defined at the distribution level (and changes happen on each new version)

I don't think changing this will have a huge performance improvment (> ~1%) without also rebuilding all libraries, and most of the system (kernel, glibc...)
I remember a project doing this >15 years ago...for 32-bit... and they gave up (too much work for too low benefit)


PGO is interesting but requires profiling (and huge build time), so it will result in a build optimized for some app, not for everything

> If not, do you offer any way to download SRPMS for a PHP version so that we can implement those changes in our own builds?

Everything is OpenSource and available on the web site (see repository main page)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: x64-64 Generation Optimizations or SRPMs

Thanks, Remi.  I definitely have questions about what the benefit will be here and what we'll have to recompile but we like to test things like this out just to find out. 

Regarding the SRPMs, I actually tried to find those and tried to use both dnf download --source and yumdownloader to try to get them so far and actually haven't found them on the repo website anywhere either.  That's why I was asking about it.  Possible that I'm just looking in the wrong place but if you happen to know where I'd find those and can direct me, that would be a huge help.

Re: x64-64 Generation Optimizations or SRPMs

> Possible that I'm just looking in the wrong place but if you happen to know where I'd find those and can direct me

As I said, see the repository main page, and the last link at the bottom.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: x64-64 Generation Optimizations or SRPMs

OK.  Yep.  I was looking in the main repos for a SOURCES dir rather than a separate sources link.  That explains it.  I have it now.  Thank you again.

Re: x64-64 Generation Optimizations or SRPMs

Many thanks for the clarifying this issue Remi.

I've considered this exact issue many times over the years and have often been amazed that people with so much more experience than me have come to the conclusion that recompiling for a specific architecture nets so little benefit. Especially when considering there has been over 25 years of CPU instruction extensions to consider. (I'm old enough to remember mucking about with AMD's 3Dnow! extensions in assembler)

Do you have any idea which libraries would net the most benefit for machine specific optimization, and if so how much benefit is had?

Many thanks for an amazing repo.

Re: x64-64 Generation Optimizations or SRPMs

> Do you have any idea which libraries would net the most benefit for machine specific optimization, and if so how much benefit is had?

Probably glibc, used by everything else.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi