home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_07_02
/
v7n2087a.txt
< prev
next >
Wrap
Text File
|
1988-12-09
|
6KB
|
165 lines
TABLE 1 - Selected High C 386 configuration options
option description cfg cmd prag env
ln
ansi enforce ansi standards X X
asm make assembly listing X X
cram compile in minimum memory X X
debug make OMF debug records X
define macro definitions X
Global_alias_convention X X
in_ext default input file extension X
ipath include file search path X X X X
lin listing lines per page X
list listing file X
no87 emulate even if 80x87 present X
object output file X
off turn compiler toggles off X X
on turn compiler toggles on X X
out_ext default output file type X
profile name of profile file X
tmpi1 instruction paging file X
tmpi2 intermediate paging file X
tmptp tree paging file X
tpages tree page memory buffers X X
xref make file for XREF utility X
TABLE 2 - Selected High C Compiler toggles
toggle description
Auto_reg_allocate auto allocate register variables
Emit_line_table put table of source line #'s in OBJ
Emit_names put function names in OBJ
Floating_point emit 80x87 code instead of using library
Optimize_for_space make output as small as possible
Optimize_FP save frame pointer only when necessary
Optimize_xjmp merge common code at entrance & exit of loops
Optimize_xjmp_space merge common code before jumps to same address
Parm_warnings check all function argument matching
PCC_msgs only give portability warnings
Print_protos print function headers for all functions
Quiet supress announcing each compiler phase
TABLE 3 - Benchmarking High C 386. All times are in minutes,
seconds, and tenths of seconds. Timing was done on a 16 mhz 80386
with 4 megabytes of memory and 30 megabyte Seagate hard disk.
Sieve times exclude load time. Compile times include load time.
10 Iterations of the Sieve of Eratosthenes
High C 386 Microsoft C
(protected) (real)
v1.4 v5.0
8K byte array 0:00.8 0:00.6
256K byte array 0:29.9 1:36.5
Compiling times for the QED text editor
High C 386 DeSmet C
(protected) (real)
v1.4 v3.03
14 modules on hard disk 5:46.3 1:10.4
Temporary files on VDISK 5:02.9 0:47.2
1 5000 line module on hard disk 2:39.7 *
Temporary files on VDISK 1:18.2 *
Compiled in protected mode 1:07.9 *
* compiler unable to perform these operations
FIGURE 1 - High C cross-jump optimizations
Tail Merging:
BEFORE AFTER
jmp
start start
jmp
block
.
. .
. .
.
duplicate
block block
continue continue
Duplicate code-block/jump pair merging:
jmp
start start
jmp
block
.
. .
. .
.
duplicate jmp jmp
block block
. .
. .
. .
continue continue
LISTING 1 - A memory sizing routine illustrating High C's
imbedded underscores for numeric constants, as well as
nested functions. Published with the permission of Meta Ware.
extern void * malloc(unsigned int);
extern void free(void *);
unsigned Size_mem() {
unsigned int Alloc_amount = 0xff_ffff, /* 16 mb. */
Sum = 0;
void try() {
void *p;
do {
p = malloc(Alloc_amount);
Alloc_amount = Alloc_amount / 2;
} while (p == 0 && Alloc_amount > 256);
if (p != 0) {
Sum += Alloc_amount*2;
if (Alloc_amount > 256) try();
}
if (p != 0) free(p);
}
try();
return Sum;
}
High C 386 $895
Meta Ware, Inc.
903 Pacific Avenue
Santa Cruz, CA 95060
(408) 429-6382