Earlier quoted context omitted.
The only time I used -march=native was for a university assignment which was built and evaluated on the same server, and it allowed juicing an extra bit of performance. Using it basically means locking the program to the current CPU only. However I'm not sure about -O3. I know it can make the binary larger, not sure about other downsides.
If you have a lot of "data plane" code or other looping over data, you can see a big gain from -O3 because of more aggressive unrolling and vectorization (HPC people use -O3 quite a lot). CRUD-like applications and other things that are branchy and heavy on control flow will often see a mild performance regression from use of -O3 compared to -O2 because of more frequent frequency hits due to AVX instructions and larg…
Show HN: I built a Cargo-like build tool for C/C++
151–160 of 181 posts
Re: Show HN: I built a Cargo-like build tool for C/C++
#152Re: Show HN: I built a Cargo-like build tool for C/C++
#153Re: Show HN: I built a Cargo-like build tool for C/C++
#154Earlier quoted context omitted.
Yes https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart
But not with march=native? The distirbuted binaries use two standard instruction sets for x86-64 and one for arm like “march=x86-64-v3” https://wiki.gentoo.org/wiki/Gentoo_binhost/Available_packag...
Re: Show HN: I built a Cargo-like build tool for C/C++
#155Re: Show HN: I built a Cargo-like build tool for C/C++
#156The installation instructions being a `curl | sh` writing to the user's bashrc does not inspire confidence.
They did say it was inspired by cargo, which is often installed using rustup as such: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Re: Show HN: I built a Cargo-like build tool for C/C++
#157Earlier quoted context omitted.
[flagged]
If you'd just left off "to fuck" you'd end up way less downvoted, if it even happened at all.
Re: Show HN: I built a Cargo-like build tool for C/C++
#158Earlier quoted context omitted.
Do your Makefiles work across Linux, macOS and Windows (without WSL or MingW), GCC, Clang and MSVC, or allow loading the project into an IDE like Xcode or Visual Studio though? That's why meta-build-systems like cmake were created, not to be a better GNU Make.
There is something fundamentally wrong with Windows or Visual Studio that it requires ugly solutions.
Re: Show HN: I built a Cargo-like build tool for C/C++
#159Earlier quoted context omitted.
There is something fundamentally wrong with Windows or Visual Studio that it requires ugly solutions.
Ok, then just cl.exe instead of gcc or clang. Completely different set of command line options from gcc and clang, but that's fine. C/C++ build tooling needs to be able to deal with different toolchains. The diversity of C/C++ toolchains is a strength, not a weakness :) One nice feature of MSVC is that you can describe the linker dependencies in the source files (via #pragma comment(lib, ...)), this enables building…
Clang does have clang-cl with similar command-line options.