3 ms·
Can you please elaborate, what’s wrong and what do I need to do when building from source?
by Bootvis 4y ago
Can you please elaborate, what’s wrong and what do I need to do when building from source?
- adgjlsfhk1 4y agocompile with --march=native can often be significant.
- jeffbee 4y agoCompiling for your target is good, not using the PLT for mem* functions helps a ton, feedback-directed optimization and LTO and/or post-link optimization helps the most. For CPU-bound workloads of course.
- mayama 4y agoWill native march option work in case of cloud where you're not in control of cpu?
- jeffbee 4y agoI haven't used a cloud where you don't dictate the exact CPU you want. EC2, GCE, and Azure all provide specific guarantees. Even if you wanted a generic any-cloud binary you would probably compile with -march=skylake or, if truly paranoid, sandybridge. Many distro packages are, by contrast, compiled for k8-generic. Freaking Opteron! BTW "native" is not really recommendable. One really ought to target a particular platform.
- brianwawok 4y agoDo google and AWS hosted postgres do this? I assume, but I am not sure how to check.
- jeffbee 4y agoI don't know but it would be out-of-character for Google to have a C program that wasn't optimized to the hilt.