PRODUCT : Borland C++ NUMBER : 656 VERSION : 2.0 OS : PC DOS DATE : October 19, 1993 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 swapping: 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 mode. 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 VERSION : 2.0 OS : PC DOS DATE : October 19, 1993 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 not. 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. DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.