logoalt Hacker News

pclmulqdqyesterday at 12:46 PM6 repliesview on HN

-O3 -march=haswell

The second one is your problem. Haswell is 15 years old now. Almost nobody owns a CPU that old. -O3 makes a lot of architecture-dependent decisions, and tying yourself to an antique architecture gives you very bad results.


Replies

arthur2e5yesterday at 12:58 PM

The author gives a godbolt link. It takes 5 minutes to add two compilers on raptorlake and see that it gives the same result.

https://godbolt.org/z/oof145zjb

So no, Haswell is not the problem. LLVM just doesn't know about the dependency thing.

show 2 replies
mgaunardyesterday at 1:12 PM

My desktop computer is a Sandy Bridge from 2011. I still haven't seen any compelling reason to upgrade.

show 2 replies
ksecyesterday at 2:06 PM

Not as old but I am still typing this on a MacBook Pro Early 2015 with a Broadwell CPU. It is doing pretty well with Chrome and Firefox, not so much with Safari.

cassepipeyesterday at 4:51 PM

I do. Had to replace the plastics of the laptop and the screen's definition is unacceptable but with Linux and a SSD it's still fine for basic computer usage. Not my daily driver but kept it as a daily drivers for 10 years.

wffurryesterday at 2:02 PM

The default is an even older instruction set. Maybe you meant to suggest -march native ?

ericpauleyyesterday at 12:56 PM

This era of CPUs has held up surprisingly well. I built an Ivy Bridge desktop in 2012 that still sees daily productivity use (albeit with an NVMe and RAM upgrade).