this post was submitted on 13 Feb 2024
589 points (97.3% liked)

Technology

59374 readers
3169 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 9 months ago (1 children)

That's not a guarantee on the Linux world either, but at least you do have the option of recompiling your distro to not use those options.

There's talks from some distros to start dropping support for such old CPUs because it's holding back newer CPUs that could run even faster by using those instructions.

[–] [email protected] 0 points 9 months ago (1 children)

Is it really that hard to include a fallback though? Obviously there's a way to collect the information without that flag. I suppose if you didn't want to take a performance hitting checking the flag all the time it could become a compile option (I would think anyone running that old of hardware would be willing to learn how to compile the kernel anyway), but there should be options available to keep the support available some how?

[–] [email protected] 2 points 9 months ago

That's pretty much exactly how it works already. You compile with -march=x86-64-v4 and it'll use SSE and AVX all over the place.

glibc does the runtime thing, but only once on application startup where the dynamic linker will link the version of the function optimized for your CPU. But it's a manual process on glibc's part, the variants are written by hand.

Not every project cares enough to do it dynamically like that and it would be a nightmare that way.

The fallback is, recompile with -march=x86-64 which will only use the base set of instructions. Or -march=i486 if you want to run on absolutely ancient hardware.