Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I make my software run even faster?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
leyvi
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2023
Posts: 143

PostPosted: Fri Feb 21, 2025 11:50 am    Post subject: How can I make my software run even faster? Reply with quote

One of the reasons I chose Gentoo was the granular control it gives you over how everything is built; I want my software to run as fast as possible, without compromising on stability. Thus, I have the following build environments: this one for LLVM, and this one for GCC. I use LLVM whenever possible, and I turn off LTO as needed for compatibility. I'd like to know: are there any changes I could make to these build environments that would further increase the performance of my packages, without causing undefined behavior or instability? I don't care about compilation times or build size, as I have a pretty good CPU (Zen4) and enough RAM to compile four instances of chromium in RAM at the same time, as well as more storage than I could ever really use. Maybe there's a way to force PGO on every package, kind of like Firefox with the pgo flag enabled?
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1507
Location: Richmond Hill, Canada

PostPosted: Fri Feb 21, 2025 1:13 pm    Post subject: Reply with quote

How are you going to measure it is even faster?

How do you know those packages that your setting make them faster and not slower?

"fast" is relative word, it have to have something to compare.
Back to top
View user's profile Send private message
leyvi
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2023
Posts: 143

PostPosted: Fri Feb 21, 2025 2:16 pm    Post subject: Reply with quote

You're right, I really should be doing extensive benchmarking if I want to see if those flags are optimal. What I should have said was: "theoretically faster". My current flags ask the compiler to vectorize anything it can (or they should, anyway), as well as the regular level two optimizations with LTO enabled, targeted at and tuned for my specific microarchitecture, which should in theory make the most of my CPU and increase performance. My question still stands, with this correction.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum