Pascal --> C question

TLIMONCE%DREW.BITNET at CUNYVM.CUNY.EDU TLIMONCE%DREW.BITNET at CUNYVM.CUNY.EDU
Sun Mar 13 13:11:40 AEST 1988


On 12-MAR-1988 09:06 ok at quintus.uucp wrote:

>You would be lucky to find a Pascal compiler which will pack array
>elements down to the bit level.  Byte level, yes.

Actually, the only version of Pascal that I will use is VaxPascal under
VMS (what's that?) because it has some execelent optimizations.  First of
all, it does wonders with PACKED arrays and variables.  Unpacked BOOLEANs
take up the same as a INTEGER (4 bytes/1 word) so that you have maximum
speed but PACKED ARRAY [xx..yy] OF BOOLEAN is packed to the bit-level.
VaxPascal will also do optimizations like not recalculating x+1 each time
it's used.  (This next one addresses anyother info-c debate)  It will even
attempt to make functions and procedures inline if it can determine that
it is not recursive (or any other problems) and if it will save
memory/time.

Best of all, all of the optimizations and run-time checking can be turned
on or off easily.  I do super-fast compiles that generate slow, bulky code
until I know it all works.  Then I do PASCAL/OPTIMIZE=ALL/CHECK=NONE and
let it take all the time it wants to make my final product.

Why can't popular C compilers do that?  (Whoa!  Maybe I should ask, "Which
ones do that NOW?" ?)

Actually, from what I read, we are on the brink of seeing more and more
optimizers on the market very soon.  All that grad-school work on writing
faster compilers is finally feasible now that we all have our wiz-bang
machines based on 386s and '030s (yeah right!  Lemme win the lottery first!)


Tom Limoncelli | Drew U/Box 1060/Madison NJ 07940 | tlimonce at drew.BITNET
    Disclaimer: These are my views, not my employer or Drew Univesity
--------------------------------------------------------------------------



More information about the Comp.lang.c mailing list