logoalt Hacker News

hn_submittoday at 12:12 AM3 repliesview on HN

So you write software for a platform you know nothing about?


Replies

Twirrimtoday at 1:30 AM

> So you write software for a platform you know nothing about?

That's how a sizeable chunk of software is written and shipped.

Runtime detection of CPU features is very much a thing, and is in fact used extensively in software you use or interact with every single day.

Just as a quick example, OpenSSL's approach for x86_64 is OPENSSL_ia32cap

https://docs.openssl.org/master/man3/OPENSSL_ia32cap/

This ensures (in theory, at least) that even if you're using your linux distribution's openssl library which is more generically targeted, you will get optimal/native runtime performance for your actual CPU.

show 1 reply
dmitrygrtoday at 12:46 AM

Very often. Yes. Or software that will run on any similar arch by auto detecting the environment.

kjs3today at 12:14 AM

[flagged]

show 2 replies