News for hackers. Stuff that matters.
Re:Tracking developer build times to decide if the M3 MacBoo... by gizmo on Friday December 29, 2023 @09:05PM (#38812276)
Somehow programmers have come to accept that a minuscule change in a single function that only result in a few bytes changing in a binary takes forever to compile and link. Compilation and linking should be basically instantaneous. So fast that you don't even realize there is a compilation step at all.

Sure, release builds with whole program optimization and other fancy compiler techniques can take longer. That's fine. But the regular compile/debug/test loop can still be instant. For legacy reasons compilation in systems languages is unbelievably slow but it doesn't have to be this way.

Re:Tracking developer build times to decide if the M3 MacBoo... by cole-k on Saturday December 30, 2023 @12:53AM (#38813081)
I mean yeah I've come to accept it because I don't know any different. If you can share some examples of large-scale projects that you can compile to test locally near-instantly - or how we might change existing projects/languages to allow for this - then you will have my attention instead of skepticism.
Re:Tracking developer build times to decide if the M3 MacBoo... by euos on Saturday December 30, 2023 @11:02AM (#38816227)
That’s why I write test first. I don’t want to build everything.
Re:Tracking developer build times to decide if the M3 MacBoo... by PhilipRoman on Saturday December 30, 2023 @04:45AM (#38813960)
This is the reason why I often use tcc compiler for my edit/compile/hotreload cycle, it is about 8x faster than gcc with -O0 and 20x faster than gcc with -O2.

With tcc the initial compilation of hostapd it takes about 0.7 seconds and incremental builds are roughly 50 milliseconds.

The only problem is that tcc's diagnostics aren't the best and sometimes there are mild compatibility issues (usually it is enough to tweak CFLAGS or add some macro definition)

Re:Tracking developer build times to decide if the M3 MacBoo... by euos on Saturday December 30, 2023 @11:01AM (#38816218)
I am firmly in test-driven development camp. My test cases build and run interactively. I rarely need to do a full build. CI will make sure I didn’t break anything unexpected.