Tiny Core Extensions > TCE Tips & Tricks

Faster packages

(1/2) > >>

Vaguiner:
I've discovered some interesting things recently. First and certainly most relevant is why tinycore programs are mostly noticeably slower than the same programs in other distributions, and the villain is:


--- Code: ---export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
--- End code ---

generic is basically like telling the compiler to avoid anything above SSE2
which, in tests, the mere use of mtune=generic became redundant and irrelevant, since even SSE2 is not used when using -Os
So yes, -Os is extremely overkill.
It prevented auto vectorization using 16 bytes (SSE2, popularized since 2001). And it prevented even MMX (8 bytes, popularized since 1997).

At the same time, I discovered how relatively easy it is to get github to compile your tcz. For this reason, I'm gradually recompiling everything relevant to performance that I like, since I use tiyncore on a daily basis.
https://github.com/vaguinerg/tinycore-autoupdated-extensions

nick65go:
Thank you! this should be in TC wiki in bold.
Maybe this info is common knowledge for most people, but the details were not known by me.
I understand that TinyCore "must" be compatible with 486 CPU and to be small size. But I assumed that the compiled binaries have inside a fork path to chose better CPU instructions (SSE2, MMX, etc) because -march and -mtune parameters.

One solution could be to do it like OPEN SUSE did, to use GCC multiple compiled libraries (in different sub-folders), or like CLEAR Linux with multiple paths inside the same executable/libraries. So the programs could auto-chose for which CPU to load the optimized *.so libraries. --> I could bet it will not happen in TC because limited man-hours available (free of charge) of TC team.

Missing those advanced instructions, if you are right, is a bottleneck for any normal/modern CPU made in the last 5-10 years (assuming you buy a new machine in less than 10 years - because capitalism intentional  planing for obsolescence / oblivion).

Vaguiner:

--- Quote from: nick65go on July 18, 2025, 04:41:02 AM ---Missing those advanced instructions, if you are right, is a bottleneck for any normal/modern CPU made in the last 5-10 years (assuming you buy a new machine in less than 10 years - because capitalism intentional  planing for obsolescence / oblivion).

--- End quote ---

This is a bottleneck for processors launched since 2003. I also forgot to mention that I meant the 64-bit version of tinycore.

The first 64-bit processor marketed worldwide, launched in 2003, came with SSE2. SSE2 is being ignored by -Os.

It's a performance reduction with absolutely no real gain, increasing tcz's block size by a few bytes will reduce tcz's size more than -Os.

nick65go:
@Vaguiner: Maybe you are right, but you bark at the wrong tree.
It depends of what you most value in life. Ex: for me is time, to use the tool/machine instead of tune-up it, patch/debug. In year 2025 a medium range laptop PRICE is .. not significant [if you are employed] if PC does not crash in 5-8 years. [measure it as how many downtown dinners or beers you do not drink to buy a brand new PC today].

With a better CPU (P+E cores today) you have more CPU cache L1/L2. Plus faster SDD/Nvme for HDD, plus faster DDRAM timing for RAM memory, plus faster USB3, PCIe5 bus, etc. And using a linux kernel like from CachyOS you are "in business" in few minutes. When SPEED is your goal, why would you use TC if you have a "modern" machine? I do not even talk about audit / security, or "reproducibility" of packages if you use it as a money making machine.

Vice-versa, if you have a slow/old machine, like 486-686 range, any optimization you did to it will not make significant speed to old hardware (if it still functions after decades). TC is very good to LEARNING and play.

nick65go:
When you talk about "faster" packages, do you think about MEASURED speed increase in TC, as small as 0.5%-4%?

or big like 4x-20x:
https://www.phoronix.com/forums/forum/software/general-linux-open-source/1551009-squashfs-tools-4-7-released-20-to-more-than-ten-times-faster 

or something like this:
https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1561904-new-ffmpeg-avx-512-optimizations-hit-up-to-36x-the-performance-of-plain-c-code/page2
Q.E.D.

Navigation

[0] Message Index

[#] Next page

Go to full version