To, me, testing and retesting different optimizations is a
huge waste of time and at most you might save 1 second :)
For programs created by others, I keep whatever setting--
the use since they know much better than me.
To, me, testing and retesting different optimizations is a huge waste of
time and at most you might save 1 second :)
Follow-ups trimmed to comp.os.linux.misc
In comp.os.linux.misc Lester Thorpe <lt@gnu.rocks> wrote:
Program optimization is essential, but yet it is difficult<snip>
to arrive at a best method.
I propose that GNU/Linux programmers should determine
the best options and then publish these recommendations
in the source tree to guide the interested user.
I find O1 is good enough for all programs I create.
To, me, testing and retesting different optimizations is a
huge waste of time and at most you might save 1 second :)
For programs created by others, I keep whatever setting
the use since they know much better than me.
On Thu, 11 Sep 2025 15:11:24 -0000 (UTC)
John McCue <jmclnx@gmail.com.invalid> wrote:
I find O1 is good enough for all programs I create.
To, me, testing and retesting different optimizations is a
huge waste of time and at most you might save 1 second :)
Even if you're an optimization freak (and there's nothing wrong with
that,) the efficacy of tweaks like loop unrolling is highly dependent
on machine particulars (cache size, etc.) - it's difficult if not
impossible to establish a one-size-fits-all recipe for True Optimum Performance that could be handed out to non-freaks, as is being
suggested here. Some level of tweaking may be warranted (e.g. unrolling
loops in a way that suits the particular algorithm,) but there's little
point trying to generalize deep grease-monkey fine-tuning across *all
target systems* even for a single distro, let alone The World At Large.
On Thu, 11 Sep 2025 15:11:24 -0000 (UTC), John McCue wrote:
To, me, testing and retesting different optimizations is a huge waste of
time and at most you might save 1 second :)
I was once hired to build an app in MATLAB for decoding and displaying multiple channels of EEG data, using its built-in GUI tools (momentary shudder as the PTSD kicks in), in real time. One of the original
researchers had already written some stream-decoding code to start with; I had a go at doing it in different ways, and was able to achieve close to a 2:1 speedup on the DEC Alpha I was using for testing.
Then I ran the same code on the Windows NT box which was going to be used
as the actual deployment platform ... and most of the speedup went away.
THE best op is to proto, look/think for a few weeks,
then re-write.
That will do FAR more than any compiler tweaks.
THE best op is to proto, look/think for a few weeks,
then re-write.
That will do FAR more than any compiler tweaks.
On Fri, 12 Sep 2025 03:02:09 -0400, c186282 wrote:
THE best op is to proto, look/think for a few weeks,
then re-write.
That will do FAR more than any compiler tweaks.
Not necessarily.
Consider the Automatically Tuned Linear Algebra Software (ATLAS):
<https://math-atlas.sourceforge.net/>
Linear algebra (i.e. matrix operations) software is used as a standard benchmark for all supercomputers.
The ATLAS program will automatically tune itself, using compiler options,
for the best performance on a particular machine.
ATLAS has some pre-determined options for certain CPUs but if a CPU
is not on the list ATLAS will then undergo an automatic tuning wherein different options are tried and compared.
Compiler tweaks can make a big difference.
The original point of this thread is that all software should
emulate ATLAS to some extent.
The ATLAS program will automatically tune itself, using compiler options,
for the best performance on a particular machine.
On 12/09/2025 11:17, Farley Flud wrote:
The ATLAS program will automatically tune itself, using compiler options,
for the best performance on a particular machine.
How does it know what machine is the target?
The ATLAS program will automatically tune itself, using compiler
options, for the best performance on a particular machine.
How does it know what machine is the target?
On Fri, 12 Sep 2025 15:45:45 +0100, The Natural Philosopher wrote:
On 12/09/2025 11:17, Farley Flud wrote:
The ATLAS program will automatically tune itself, using compiler options, >>> for the best performance on a particular machine.
How does it know what machine is the target?
The tuning occurs during build time. The "target" is the machine upon which it is being built.
No binaries are distributed. Only the source code is available.
However, some GNU/Linux distros will include binary Atlas packages
but these are necessarily sub-optimal builds. Check out the blurb
from Fedora:
https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/a/atlas-3.10.3-30.fc43.x86_64.html
On Fri, 12 Sep 2025 03:02:09 -0400, c186282 wrote:
THE best op is to proto, look/think for a few weeks,
then re-write.
That will do FAR more than any compiler tweaks.
Everyone is missing the main point.
I am referring to optimizing code that is already published
and available, e.g. the average GNU/Linux package.
I have experienced up to 40% performance increase using just compiler options.
But finding the best options can at times be difficult
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,070 |
Nodes: | 10 (0 / 10) |
Uptime: | 151:39:26 |
Calls: | 13,733 |
Calls today: | 1 |
Files: | 186,966 |
D/L today: |
724 files (253M bytes) |
Messages: | 2,418,444 |