Category : C Source Code
Archive   : C-ALL.ZIP
Filename : TI656.ASC

Output of file : TI656.ASC contained in archive : C-ALL.ZIP

PRODUCT : Borland C++ NUMBER : 656
DATE : September 11, 1991 PAGE : 1/2

TITLE : Speeding Up BC & BCC Under Windows

Decremental Speed Differential in BC and BCC

Unfortunately, BC and BCC seem to link more slowly than their TC
and TCC counterparts. Actually, this occurs when linking Windows
applications, something that TC and TCC could not do at all.
There are two characteristics of Windows applications that
combine to cause the real mode linker to perform a lot of

1. The number of symbols in the Windows import library

2. The pattern of references to symbols in the RTL

In addition, running under Windows can make things worse because
EMS is simulated on disk by Windows, which slows things down.
When we looked at tuning the linker to run faster in this
specialized situation, any solution we found would have slowed it
down in every other situation, including running in protected

The real mode linker uses EMS or disk for swapping data. EMS is
obviously faster than disk; the difference is accentuated
especially in the situation that happens to occur when linking
Windows apps. Outside of Windows, the linker automatically uses
EMS if it is available.

Under Windows, the linker will only have EMS available if the PIF
makes it available. Running a real mode linker without a PIF
under Windows will be slow because it will not have any EMS
available. Moreover, Windows in enhanced mode uses a swap file
to simulate low, EMS and XMS memories. Even if you have a PIF
which specifies EMS and you are running the linker under enhanced
mode, Windows may actually be swapping to disk when the linker
thinks it's using EMS. This is even less efficient than having
the linker itself swap to disk, and it gets very slow.

The way to prevent Windows from simulating EMS on disk is by
specifying EMS memory as locked in the PIF. With that setup,
Windows will not run the program unless the amount of memory
requested is really available. So the recommended way to run the
real mode BC or BCC under enhanced mode Windows is to specify one

PRODUCT : Borland C++ NUMBER : 656
DATE : September 11, 1991 PAGE : 2/2

TITLE : Speeding Up BC & BCC Under Windows

and a half meg of EMS in the PIF and specify that it's locked.
More EMS will probably not make a difference in performance.
However, the protected mode linker--which does no swapping at
all--will still be faster.

One final note: BCX runs the protected mode linker, BCCX does

The long term solution is to provide DPMI support for our
protected mode tools, which will allow them to run in enhanced
mode Windows with all the speed that is now demonstrated by BCX.
DPMI support is in the works for our future releases.

  3 Responses to “Category : C Source Code
Archive   : C-ALL.ZIP
Filename : TI656.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: