Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #21542
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) |
| Date | 2013-04-09 07:06 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2013Apr9.090655@mips.complang.tuwien.ac.at> (permalink) |
| References | (5 earlier) <kic08e$v5o$1@speranza.aioe.org> <-aqdnSSujs6nF9TMnZ2dnUVZ_qadnZ2d@supernews.com> <kjnd0t$iqk$1@dont-email.me> <2013Apr8.181155@mips.complang.tuwien.ac.at> <34654bdf-ae53-43e7-98b5-6d64178e88fc@googlegroups.com> |
AKE <assadebrahim2000@gmail.com> writes:
>On Monday, April 8, 2013 5:11:55 PM UTC+1, Anton Ertl wrote:
>>=20
>> General-purpose register machines have won (for the bigger CPUs), not
>> because they are a better fit for the languages, but because they
>> execute these languages fast when supported by a compiler with decent
>> register allocation.
>>=20
>
>It would seem this support's Knuth's choice of general-purpose register mac=
>hine for his MMIX 'ideal machine'. I've wondered why Knuth's algorithmic w=
>ork did not assume a simpler, stack machine. Perhaps this is why? =20
Why does he use a hypothetical machine at all? To get concrete
numbers. And apparently he wanted numbers for a close-to-real
machine. Unfortunately the IA-64 that MMIX is inspired by flopped,
but at least you can subset it to be similar to more conventional
architectures.
>(Of course, by his own admission he wanted to work with a model that was si=
>milar to the general direction of processor architectures, but that's a bit=
> chicken-and-egg: he chose the register machine direction because it is the=
> most prevalent, but it is the most prevalent presumably because it execute=
>s languages fastest when supported by a reasonably constructed optimising c=
>ompiler.)
I don't see a chicken-and-egg here. There were and are lots of
examples of different architectural styles: accumulator machines,
stack machines, special-purpose register machines, general-purpose
register machines; and people tried to make many of them fast both in
hardware implementation and in compilers. There are many cases of
accidental empires, especially in computing, but this is not such a
case.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2013: http://www.euroforth.org/ef13/
Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) rickman <gnuarm@gmail.com> - 2013-04-05 16:45 -0400
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-06 03:00 -0500
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-08 16:11 +0000
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-08 15:43 -0500
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-04-08 23:49 -0400
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-09 04:02 -0500
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-09 07:03 +0000
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-09 04:04 -0500
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) AKE <assadebrahim2000@gmail.com> - 2013-04-08 14:34 -0700
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) Bernd Paysan <bernd.paysan@gmx.de> - 2013-04-09 00:02 +0200
Re: Algorithm design: computational cost of ordinary stack operations (dup, rot, over, swap, etc.) vs. cost of fetch (@) and store (!) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-09 07:06 +0000
csiph-web