Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Compilation speed with GCC (Developers)

posted by Rugxulo Homepage, Usono, 20.06.2008, 21:28

> > 1). "-O0" (or -O2 instead of -O3) [older -O2 is as fast as newer's -O0)
>
> BAD. The time you're saving compiling is not worth all the time lost in
> an application that is now not optimized at all. Use -O2, not -O3, which
> may cause instability.

Not every app actually needs to be optimized, esp. stuff that only runs for like a second or two. Besides, the faster modern cpus get, the less noticeable it is for some minor stuff. Anyways, it's -O1 (aka, -O) that is officially recommended if you want fast optimization without long compile times. And also, you shouldn't optimize much (if at all) when developing / debugging because it makes it that much harder (esp. with -fomit-frame-pointer, which makes debugging almost impossible).

> > 2). older version (e.g. 2.95.3 or 3.4.4) [old is always less standard
> > compliant, e.g. no decent C99 support]
>
> These compilers may also contain bugs, while rare.

Even newer versions have bugs (regressions). I'm just saying, some apps were written back when those "old" versions were modern and worked fine with them. In those cases, I don't think it's "bad" to use them. If you need better C++ support or C99 or Athlon64 optimizations, of course you're gonna have to upgrade.

> > 15). DOSBox (not optimal): turn up frameskip very high
> > - don't need it when all you're using is cmdline apps !
> > - you need multi-Ghz in order to emulate a 486, so this is quite
> > slow!
>
> BAD. Avoid compiling in emulators, especially buggy ones :p

Well, I can't say for sure how unstable compiles would be on that. But it's majorly not recommended anyways because it's so ultra slow.

> > 18). use MinGW's "make -j2" under Win32 (but somewhat incompatible
> syntax
>
> This is partially what I was referring to with my response to #4.

I'm not sure when this is a good idea or not, esp. re: single core cpus and what number is appropriate for what situations (-j4?). But hey, it's worth noting. Too bad nobody ever implemented DR-DOS multitasking support into any make variant (that I know of, anyways).

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 233 users online (0 registered, 233 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum