3 ms·
One question this left me: are we leaving performance off the table by using compilers that are only using a "standard" subset of the possible instructions out
by yesimahuman 10y ago
One question this left me: are we leaving performance off the table by using compilers that are only using a "standard" subset of the possible instructions out there?
- seabrookmx 10y agoDefine "we". I think there is definitely some applications doing this. Last I checked, using default GCC settings you can drastically change the performance of the resulting app by passing different flags. This obviously depends a lot on the app, but I recall a simple raytracing program I wrote in C++ in University being sped up quite a bit when I passed it flags to optimize for Pentium4+, because it leveraged certain SSE instructions. MSVC++ with optimizations turned on actually bundles multiple copies of the binary in the resulting .exe file, and is able to pick the optimal one (based on the ISA extensions your CPU supported) at runtime. I'm sure you can do something comparable with binaries produced by GCC and CLang. Now.. do I think this improperly optimized binaries are a problem plaguing us? No. Because the large native applications that would really benefit (such as Chrome/V8) have already dealt with this. The smaller apps (think a small GTK app like gedit) won't see a noticeable performance benefit. And most newer, consumer applications (Spotify, Slack, Skype) are written in something like Node anyways.