🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1174

speeding up compilation time

#1174
From: fir
Date: Fri, 30 Oct 2026 16:58
54 lines
3012 bytes
im toying with my rasterizer code and recent few days
i used on asking ai to generate me some 3d models in
procedural form,  (this is an adventure per se becouse
it sometimes generates good sometimes bad and its a complex
adventure but thats the other interesting story
(tell us grandpa! maybe next time ) and it generated me almost 500kb
of C and my exe also increased to 500 kb binary


and the compilation slowed - it is 9 seconds now

its not long 9s as i can wait its standable but it become annoying
at this value up for me


the simple question is how to reduce this time

i must say i used tu use my library code as dll
(which kinda resolves the problem) now i dont use
- i rewritten my old dll into new project as ana exe and yet
not made it a dll

it is becouse i work on exe code and this potential dll code and its a
burden to recompile both and exportig and importig those symbols

obviously i could make dhis dll but when it will be yet larger
and this library part will be more 'stable'


the second option i consider is use #ifdef #endif

i dont use macros at all except include directive i dont use sole define
but this time for this purpose i probably will

my ide is to coment out those codes i dont use

it possibly is less efortless attempt than makin dll
- and i dont use indeed a large part of it like those models ai
generated me or many drawing routines i have in code but i dont use in
program right now

it seem a good idea

but maybe there are yet some???


i admit i search for minimal effort ones - really minimal

some other i got in mind is to maybe turn -O2 into -O1 maybe this speed 
thing up (not tried it yet though)


right now i will possibly try how this #ifdef works
Technical Details
Message-ID: <11c2ic7$e7ic$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: fir <profesor.fir@gmail.com>
Newsgroups: comp.lang.c
Subject: speeding up compilation time
Date: Fri, 30 Oct 2026 17:58:46 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <11c2ic7$e7ic$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 30 Oct 2026 16:58:47 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="466508"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+64g33051PwDGWzggY2OHjQpXg9kRlsN8="; posting-host="eff870502cf07dcc3c4d1304454792c4"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:heeJ+UbCb50y/l4DkGh9A8nHDdU= sha256:uEAqBXUG55LyByBo70wUU2izZaAVp9PqCXLGz1J+Pe8=
	sha1:AadrkBEBxdBupR6GQGRxfdRnSrk= sha256:OKxY6ooNxq8jLf7oIV3gry7G5FXfxdF9+dsrSMWbV4Y=
X-Mozilla-News-Host: news://news.eternal-september.org:119