3 ms·
>How long are you realistically "waiting for the compiler and linker"? 3 seconds? You're not recompiling the whole project after all, just one source file typic
by writebetterc 1y ago
>How long are you realistically "waiting for the compiler and linker"? 3 seconds? You're not recompiling the whole project after all, just one source file typically
10 minutes.
>If I wanna use a debugger though, now that means a full recompile to build the project without optimizations, which probably takes many minutes.
Typically always compile with debug support. You can debug an optimized build as well. Full recompile takes up to 45 minutes.
The largest reason to use a debugger is the time to recompile. Kinda, I actually like rr a lot and would prefer that to print debugging.
- mort96 1y ago10 minutes for linking? The only projects I've touched which have had those kinds of link times have been behemoths like Chromium. That must absolutely suck to work with. Have you tried out the Mold linker? It might speed it up significantly. > You can debug an optimized build as well. Eh, not really. Working with a binary where all variables are optimized out and all operators are inlined is hell.
- writebetterc 1y ago>10 minutes for linking? The only projects I've touched which have had those kinds of link times have been behemoths like Chromium. That must absolutely suck to work with. I don't know the exact amounts of time per phase, but you might change a header file and that will of course hurt you a lot more than 1 translation unit. > Eh, not really. Working with a binary where all variables are optimized out and all operators are inlined is hell. Yeah, but sometimes that's life. Reading the assembly and what not to figure things out. >That must absolutely suck to work with. Well, you know, I also get to work on something approximately as exciting as Chromium.
- mort96 1y ago> I don't know the exact amounts of time per phase, but you might change a header file and that will of course hurt you a lot more than 1 translation unit. Yeah, which is why I was talking about source files. I was surprised that changing 1 source file (meaning re-compiling that one source file and then re-linking the project) takes 10 minutes. If you're changing header files then yeah it's gonna take longer.
- writebetterc 1y agoFWIW, I've heard from people who know this stuff that linking is actually super slow for us :). I also wanted to try out mold, but I couldn't manage to get it to work.