February 15, 2003
"Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:b2jnv0$kg4$1@digitaldaemon.com...
> I suspect that the execution of your program will be dominated by the time it takes to write the file, and that any optimizations settings will have no measureable affect on the total time.

yes, that's probably true. If there is one "fastest solution", I just wanted to know whether the compiler is capable of "delivering" that for these type of small (in my case tiny) programs.


> But in general, for running under DOS, your best bet for speed would be small model (-ms) and use -o for optimization. For programs too large to run under the s model, use the 32 bit dos extender model (-mx).

Ok, thank you.


2 other questions:

What does 16-bit code actually mean? No usage of extended registers like EAX etc. and just AX...?

Is there are possibilty to specifically optimize for certain processor types (P,PIII, K7) by some option which tells the compiler which alignment or special instruction set to use?


Lars


P.s.: sorry for perhaps "out-of-place" REs, but Outlook Express doesn't RE to c++.dos.16-bits because of "no newsgroup selected"; perhaps a character problem.


February 16, 2003
"Lars Hansen" <lars.o.hansen@gmx.de> wrote in message news:b2m92v$2ofi$1@digitaldaemon.com...
> What does 16-bit code actually mean? No usage of extended registers like
EAX
> etc. and just AX...?

The CPU runs in 2 modes, 16 bit and 32 bit. You can use EAX in 16 bit mode, but it requires special instructions. 16 bit code also uses 16:16 segment/offset addressing, severely limiting the memory that can be addressed.


> Is there are possibilty to specifically optimize for certain processor
types
> (P,PIII, K7) by some option which tells the compiler which alignment or special instruction set to use?

Yes, see the -2, -3, -4, -5, -6 switches to the compiler.