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

Re: FORTH plusminus, was Re: [f-cpu] Winograd DCT on my seul.org account



On Mon, Apr 22, 2002 at 11:21:48PM +0200, Yann Guidon wrote:
[...]
> A stack-based langagae is inherently serial. this is the lethal bottleneck
> and it makes the execution on superpipelined + superscalar CPU underefficient
> because from 2 to 12 execution "threads" (dependencies) must be handled at a time.
> For example, if you have 4 pipelines with 3 cycles of latency, you have to
> find 12 operations to perform. Forth's programming paradigm forces this to be 1
> in any case because the stack is the critical ressource. Even 4-stack or 5-stack
> designs can't solve this problem completely.
[...]

Stack-based languages (this includes not only Forth, but also Java) can
execute quite efficiently if you use a smart compiler. The usual approach
is to use inline substitution, transform the stack-based code into another
representation and create optimized machine code from that. The resulting
code should be as good as that created by any C compiler.

-- 
 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/