C (1/207)

From:Nuno Trancoso
Date:01 Dec 99 at 00:27:15
Subject:Optimizing (Was: Re: Getting desperate!)

From: Nuno Trancoso <ng13577a@netc.pt>

Hya Volker

> expect the output to appear without calling fflush) - replace printf(...)
> by fprintf(stdout,...) and you should notice the difference.

I would, if my knowledge of C allowed it :((

> For programs which do real calculations I doubt that BlitzBasic can

So what is my program doing? Pretending it does calcs??? Maybe CA1D
is not interresting to you but it is to some ppl. It's much more interresting
than CA2D, better know as LIFE.

> compete with a decent optimizing C compiler. While I have never used it,
> I'd guess that if you looked at the section on optimizing in vbcc you
> would find BlitzBasic does practically none of these optimizations.

Correction, it does not do ANY optimization :( That's why i quit using
it, besides that it is processor/machine dependant.

In the Test exec's i compiled i got the following results for 999 cycles:

StormC standard libraries : ~40 seconds
VBCC ( -O3 -cpu=68040 - maxoptpasses=1000 ) : ~70 seconds
BlitzBasic2 : ~110 seconds

This doesn't mean that VBCC is in the midlle. If, as you say, you waste
time flushing buffers on every printf() call, i would like to know the results
for the modification you suggest. Anyone willing to do them, since i do not
know how to?

p.s. If i compile with +ppc, it get even slower. Is that because of context
switches between 68K/PPC from doing calcs on PPC and writing to console
using 68K?

Cya L8r,

DarkShadow
aka Nuno Trancoso



Infinity takes it's time.