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

Re: Low-level vs. High-level programming (was My First Computer)



In article <3F1744E2.80009@noneofyourbusiness.com>,
Exegete  <millers@noneofyourbusiness.com> wrote:
 
> Paul Schlyter wrote:
...................
>> I never liked Apple Pascal, and my first serious experiences
>> with Pascal was on Turbo Pascal 1 running on Apple II CP/M:
>> it was ...s.o...m.u.c.h...f.a.s.t.e.r... - on the same hardware!
> 
> Well, to be *really* picky, Paul, as you know, it wasn't the same 
> hardware. It ran on a Z-80 card of some kind.
 
True.  However the Z80 Softcard (2 MHz clock) had a performance
comparable to the 1 MHz 6502: if you compared Applesoft Basic with
MBasic (on the SoftCard), then MBasic was usually somewhat slower --
perhaps 30% or so slower.
 
> I would be curious to know if it ran, as you describe, on a Microsoft
> Soft80 card, or it if took the PCPI card's much faster processor and
> independant 64K of RAM to run faster.
 
Turbo Pascal was much faster than Apple Pascal already on the
SoftCard.  Compilation of Pascal source could easily be 100 times
faster, or more, on Turbo Pascal if the source files resided in RAM.
If it was read from the disk (through the INCLUDE directive), then
Turbo Pascal was perhaps "only" 10 times faster than Apple Pascal.
 
During run time the situation was similar: if your programs did
integer operations only (integers were 16 bits both on Turbo Pascal
and on Apple Pascal), Turbo Pascal programs ran perhaps 30 times
faster than Apple Pascal programs.  If your program did a lot of
floating-point computations, the run time of Turbo Pascal was similar
to the run time of Apple Pascal; OTOH Turbo Pascal provided 12 digits
of precision in its floating-point, while Apple Pascal provided only
7 digits of precision.  Both used binary floating-point but Turbo
Pascal used 6-byte for its f.p. values while Apple Pascal used only 4
bytes.  Here Anders Hejlsberg (author of Turbo Pascal) did some
clever tricks with the Z80, using both the regular and the alternate
register set to keep both f.p. numbers in CPU registers at the same
time, while doing an add, subtract, multiply or divide (like the
6502, the Z80 had no hardware operations for multiply and divide).
 
This was the situation for the Z80 Softcard.  If you switched to the
PCPI Appli-Card, everything CPU bound ran 3 times faster.  Disk
access was no faster of course; actually it was marginally slower
since an extra copy of the data between the Z80 and the 6502 RAM was
needed; these were separate memory spaces.  So for CP/M programs
doing much disk access, the Z80 Softcard could provide some speed
advantage over the Appli-Card.
 
OTOH there were accelerator boards for the 6502 too -- if you used
one of those, everything CPU-bound would be speeded up by a factor of
approx. 3 in Apple Pascal.
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://www.stjarnhimlen.se/
         http://home.tiscali.se/pausch/