TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Compile your software

46 pointsby wowi42almost 4 years ago

9 comments

prplalmost 4 years ago
The argument here I suppose is live on the bleeding edge? Or swap compilers&#x2F;allocators as necessary? Or use O3? I&#x27;m not entirely sure.<p>It wraps up with:<p>&gt;&gt;&gt; COMPILE YOUR SOFTWARES. It&#x27;s going to help you understand it, make your app faster, more secure (by removing the mail gateway of NGiNX for example), and it will show you which softwares are easily maintanable and reliable.<p>It is PITA is keeping up with compiler changes and library changes of third party software. In this case, throwing in different malloc implementations in there too, not to mention different libc implementations. With all those variables for each component you deploy you&#x27;re probably less likely to understand what&#x27;s going in your software.<p>Maybe for a small app with 2-3 extra pieces or something that needs to really be optimized this is good advice, but it sounds like a lot of work for significant footprints.<p>It would be nice if the official docker images had some tags that were better optimized, within reason.
评论 #27969101 未加载
评论 #27967511 未加载
评论 #27967537 未加载
评论 #27968245 未加载
brigandishalmost 4 years ago
The sad fact is that a lot of software is difficult to compile; isn&#x27;t documented well, something that is worse for building; won&#x27;t work well if installed in a non-standard way, whether that is final location, different supporting libs, or different platform; and can take a long time.<p>I&#x27;m happy nowadays when I see there&#x27;s a binary available, no mucking around with gcc&#x2F;clang&#x2F;llvm - just trying to work out which one, let alone which version! - no diving down a rabbit hole of compiling dependencies that then need other dependencies compiled… no deciphering Makefiles that were written in a way that only a C guru can grok, with no comments.<p>Whatever the benefits are, I prefer sanity.
评论 #27967747 未加载
评论 #27969127 未加载
评论 #27973624 未加载
评论 #27968182 未加载
评论 #27971837 未加载
powersnailalmost 4 years ago
Please label your bar graph axis, with units. It’s kind of counterproductive to look at a benchmark graph without knowing whether more or less is better.
评论 #27966649 未加载
评论 #27967669 未加载
评论 #27969131 未加载
Aeolunalmost 4 years ago
I don’t follow, where did this person compile anything? The only thing I saw him do was use pregenerated docker images?
评论 #27969136 未加载
binarybananaalmost 4 years ago
Other cool things you can do if you compile yourself is use features like auto parallelization[1].<p>I wouldn&#x27;t recommend to enable it system wide because it causes issues with programs that fork() due to limitations in gcc&#x27;s OpenMP library[2], but other than that it works pretty well. For example, I can fully load my 4C&#x2F;8T CPU using 3 clang processes because compilation is magically spread over multiple threads. I&#x27;ve seen a &quot;single threaded&quot; program (qemu-img) suddenly start using more than a single core to convert disk images into other formats, leading to speedups.<p>Also things like PGO&#x2F;FDO in combination with workload specific profiling data can easily give you 10% or more if you are CPU bound.<p>[1]: <a href="https:&#x2F;&#x2F;gcc.gnu.org&#x2F;wiki&#x2F;AutoParInGCC" rel="nofollow">https:&#x2F;&#x2F;gcc.gnu.org&#x2F;wiki&#x2F;AutoParInGCC</a><p>[2]: <a href="https:&#x2F;&#x2F;gcc.gnu.org&#x2F;bugzilla&#x2F;show_bug.cgi?id=42624" rel="nofollow">https:&#x2F;&#x2F;gcc.gnu.org&#x2F;bugzilla&#x2F;show_bug.cgi?id=42624</a> (There was a patch to fix this, but it never got merged and doesn&#x27;t apply to the current version any more, sadly)
b215826almost 4 years ago
Please avoid GIFs and memes in your article. It adds nothing to the actual information in the article, but takes the seriousness away and makes it less readable.
Machaalmost 4 years ago
I wonder how x86-64-v3 for Arch&#x2F;v2 for fedora in the near future will change this calculus. Currently you&#x27;re basically compiling for a Core 2&#x2F;Athlon 64 era chip, so there&#x27;s clear wins to be had, but I wonder how much of the benefit can be had just by using software requiring Haswell&#x2F;Zen1 at minimum
评论 #27973833 未加载
latenightcodingalmost 4 years ago
On my side projects I compile everything myself, but I do not completely agree with this post because Redis is one of easiest&#x2F;fastest mainstream databases to compile, it can get very time consuming and the returns are not always there.
评论 #27969138 未加载
mathfailurealmost 4 years ago
Why would I read some tosser?
评论 #27969146 未加载
评论 #27969139 未加载