Re: Re: Pragmatic Requirements Summary : update

Aaron Optimizer Digulla <[email protected]> Tue, 5 Aug 2003 23:12:02 +0200
Newsgroups gmane.comp.programming.pragmatic
Message-ID <[email protected]>
On Mon, Aug 04, 2003 at 07:47:33PM -0500, Matt Lawrence wrote:

> > >  PL/I is still used just not much. I am pretty sure that one-to-
> > > allness wasnt the only thing wrong with PL/1
> > 
> > No.  But it was the only language I could think of besides C and assembly 
> > that has had (more or less) successfull OSs written in it (Multics).  And 
> > it was the first language- that I'm aware of- that was advertised as being 
> > all things to all people.
> 
> Thirty years ago Burroughs was writing OSes in an Algol dialect.  It 
> worked very well.  There has also been some OS stuff done in Forth that 
> seemed to go ok.
> 
> This brings me to an observation: dual stack machines seem to work very 
> well.  However, the memory model used in C uses a single stack _and_ most 
> of the CPU design over the last 15 years has been focussed on making C 
> code run really fast.  Thoughts?

Dual stack probably refers to a data and a call stack but you don't
need that. You can put the "calls" on the data stack and vice versa
because when you do a call, you can't modify data at the same time
(the data must wait until the result of the call is available).

Plus, compilers unwrap the expression trees to gain speed: When you
can keep the most important parts of the expression in the cache
of your CPU, you are much faster than when you push and pop them
from the stack all the time. Example:

    a = b * b * b;

is three pushes on the stack (incl. accessing memory at different
positions) while in a serial system, you read b into a register r1,
copy it to r2 and then do two mul r1,r1,r2 (all data in the cpu,
one memory access).

-- 
==============================================
Sowatec AG,       CH-8330 Pfäffikon (ZH)
Witzbergstr. 7,   http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, [email protected]
==============================================

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/W4wwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
pragmatic_lang-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/