[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] F-CPU invited at the Libre Software Meeting



On Mon, Feb 25, 2002 at 09:57:05AM +0100, Andreas Romeyke wrote:
[...]
> - - we need a compiler which generates temporary code at a level between
> assembler/machinecode and C + libc like Forth does. At this level we had
> basic functions, which 
> 
> first:
> - - can be compiled/assembled automatically by a stupid Compiler/assembler,
> so we have first the issue of functionality
> 
> second:
> - - can be assembled/substituted by handoptimized SIMD-assembler, so we have
> then the issue of higher speed

The compiler can substitute the `macro words' on its own. If you just put
the optimization burden on the assembler, you gain nothing.

> (BTW. I know about that there is only a local optimization possible, but
> it depends on abstraction level of the basic functions in temporary code)

Why shouldn't an assembler be able to do file-global optimization?
On the other hand, it's not its job to do things like that - an
assembler should take whatever you feed it, and translate it to
machine code *literally*. Everything else leads to insanity.

> > however, in the race for performance, one of worst the problems is to
> > get rid of of the intermediate levels of representation, because we
> > lose data and semantics during each conversion. What matters most is
> > "what does the program do" rather than "how does it do it" because we
> > can find better ways.
> 
> IMHO we should use a simpler language than C because a Compiler with
> SIMD and superpipelining should be easier to developed.

C *is* a very simple language.

> > I have the feeling that GCC will make really slow programs.
> > while the superpipeline can reach a somewhat higher frequency,
> > an inadequate compiler makes the system work really slow.
> > i fear that this constatation can be used as an argument
> > against the project.
> 
> The problem is that softwaredevelopers thinking more in serial than
> parallel. You can verify this thesis comparing your code-writing with VHDL
> and with C/C++.

That's right. Software -- at least as we know it today -- *is* serial,
with very few exceptions. On the other hand, we can easily see that in
an expression like

	p = a * a + b * b + c * c + d * d;

there is quite a bit of parallelism: you can calculate the products
simultaneously, and parts of the sum as well. But most languages don't
let us specify that we want things done this way.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/