[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] c++ & mem
On Tue, 12 Dec 2000, Stephen J. Turnbull wrote:
> Then go find out the history of "Duff's device." Of course compilers
> can unroll loops. The point is that unrolling the loop optimally to
> match the spec of a hardware device is something a compiler cannot do,
> because it can't read the spec. Future compilers, maybe. Current
> ones, no.
So what does -march and -mcpu do in gcc? Surely scheduling is modified by
these params?
> things that a human would not really be able to do by hand, but if one
> of those optimizations is buggy, it's damn hard to debug. Sometimes
> you need the speed, but can't trust the compiler, so you do it
> yourself.
A brain damaged architecture like x86 lends itself to hand tuned code,
whereas a more register-full architecture with RISC design (e.g. Ultra
SPARC) it's probably best to let the compiler do it's thing.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.