"Who needs Link-Time Optimization when you can write the entire program in the same file?"
@niconiconi people writing C/C++ programs with source files longer than a few screens should be sentenced to porting their code to BSD running on Motorola 68k.
FWIW, this experience helped me to understand why long source files are a bad idea.
@nina_kali_nina @niconiconi oh are there runtime reasons? Care to share some stories?
@littlefox @niconiconi ez: compilation takes a lot of time on smaller machines. If you have compilation errors, it's much faster to fix them in small files (10-20 seconds per file) than waiting for a compiler to fail on a large file (which can take minutes)
@nina_kali_nina @niconiconi ah so porting while working on target machine and not cross compiling, gotcha - the pros there are many, yes ^^
Was wondering something like the linker fun leading to static library authors putting a single function per source file ^^
Thanks :)
@nina_kali_nina@tech.lgbt @littlefox@gotosocial-dev.svc.0x0a.network You can find the same experience on a desktop with some embedded-friendly libraries that ship a single-file version of the source code. Before I wrote this, a single SQLite build command took over a minute at building and linking on my machine.
@niconiconi @nina_kali_nina or when compiling llvm or edk2
(Ok, not sure about edk2 rn, but llvm sure has some translations that take a while ..)
((Given your other post, I had to include a translation unit reference
@lanodan @niconiconi I run latest NetBSD (9.3) on our Macintosh Classic
@nina_kali_nina @lanodan @niconiconi Kinda dumb but may I ask for the output of `openssl speed -evp chacha20` in that machine?
Curious how fast would it be when doing modern cryptography
@koakuma @lanodan @niconiconi I would have to unpack it first, I'm currently in the process of moving houses. My guess is that it would be way too slow to be of any practical use; my Pentium-class computers barely handle EC well enough :(
@koakuma@uwu.social @nina_kali_nina@tech.lgbt @lanodan@queer.hacktivis.me Just write a hand-optimized ASM implementation and count cycles.
I once worked at a place which routinely had multihundred line functions, and insane includes.
I once did a g++ -E on a file, and found the first line of code not imported via #include didn't appear until line 10,000 or so.
But we had monster servers to do compilations on.