see below, plz.
Dick
----- Original Message -----
From: "Ben Franchuk" <bfranchuk(a)jetnet.ab.ca>
To: <classiccmp(a)classiccmp.org>
Sent: Saturday, December 22, 2001 4:44 AM
Subject: Re: 6502/Z80 speed comparison (was MITS 2SIO serial chip?)
Richard Erlacher wrote:
>
> Let's leave compilers out of the equation. Even the same small-C compiler,
> targeted at the two quite different CPU's potentially represent a
significant
skew in favor
of one or another of the two.
Dick
How can you have skew? That is the whole idea of benchmark is to
compare two machines.
There are lots of ways in which to compare two machines. In one case you
compare how quickly or easily a particular task can be accomplished on that
particular pair of machines. Comparing the 6502 with the Z80 is extremely
difficult in this case because the quality and character of contemporaneous
software was so different. Tools and applications for the Z80, particularly
under CP/M were quite solid and professional in nature, while the "similar"
commercial products for the 6502 were limited, largely, by market forces, not
the architecture, to the Apple][, quite lame by comparison.
The Basic interpreter, for example, is a case you might want to examine. If you
were a real glutton for punishment, you could, point-by-point compare/contrast
the two and would find that the product for the 8080 was quite "serious" and
"professional" in character, the one for the 6502 was less so, being more or
less skewed toward the toy market.
Later versions for the 6502 were similarly skewed, since the 6502 was really
never used in a commercial machine intended for computing use on the U.S.
market. The early Commodore machines might have been an example. I did see a
"PET" machine that had a real keyboard on it in a magazine ad, though I never
saw one "in the flesh." The European version of that model was the only
6502-based machine that I ever knew to support 8" double-density diskettes,
though I didn't see that working "in the flesh" either. I did cash the
check I
got from the folks who sold the adapter, however.
I would expect that the simple C that was given would
be a
good test when judged with other benchmarks.
If you can come up with a 'C' compiler of the '70's that you believe
generated
comparably good/poor machine code for both CPU's from the same source syntax I'd
be really interested to know about it.
The 8080/Z80/8086
I don't find it appropriate to lump the 8086 family together with the 8080 and
Z80. The former is a pitifully poor architecture, designed by the marketing
department and not by competent engineers, as a quick solution to the problems
Intel was faced with in the late '70's, since their architecture was
structurally limited while their principal competitor's product line was not.
The 8080 was, for its time, a solid and well-thought-out architecture, designed
for maximal effectiveness within the confines of the field of applications for
which it was designed. The Z80 was yet another step in that direction, though
it lacked some simple but vital features the lack of which made its enhanced
features much more difficult to use than they might have been.
all generate the same poor code.
The CPU's don't generate the code. Some programmer somwhere takes his best shot
at a code generator, and the rest of us have to choose whether to use it or not.
During the timespan over which I was using 6502's and Z80's, I didn't ever
come
across a 'C' compiler for the 6502. AFAIK, there's only one of them around
now
that amounts to anything and even that's somewhat of a mystery. There's never
been a native development environment of the class, even of CP/M which, though
quite functional, was less than most folks wanted. It was quite a bit more than
anything I ever encountered for the 6502, however, which explains why I used
CP/M.
This surprised me as shows how poor the 16 bit intel
product was.
Perhaps that's because the Intel product was only partly a 16-bit product, owing
much of its benefit and many of its limitations to its predecessors.
The PDP-11 version was rather nice but it even has a
few quirks.
--
Ben Franchuk --- Pre-historic Cpu's --
www.jetnet.ab.ca/users/bfranchuk/index.html
PS. Note all my FPGA machines generate nice 'Small C' code and have a
resonably orthogonal instruction set. The well hacked Small C compiler
self compiles under > 24 KB. A similar compiler for the 8080
is about 48KB.