[net.micro.apple] Speed of Apple Drives

ags@pucc-i (Seaman) (06/13/84)

Don't make any assumptions about the speed of the drives on an Apple II
unless you have used Apple Pascal.  It is a MUCH faster disk operating
system than (*choke*) Apple DOS.  It is also faster than CP/M.
-- 

Dave Seaman			"My hovercraft is full of eels."
..!pur-ee!pucc-i:ags

ags@pucc-i (Seaman) (06/26/84)

I tried to respond to this by mail, but it didn't work.  I said earlier that
Apple Pascal is *much* faster on disk accesses than Apple DOS, and that it
is also faster than CP/M.

How much faster than CP/M?  I don't have CP/M myself, so my information here is
second hand.  I do know that Pascal uses a "two-ascending" sector interleaving
scheme, while CP/M uses "three-ascending".  Two-ascending is guaranteed to be 
faster as long as you are not missing sectors and having to wait an extra full
rotation.  Pascal can do this because there is less intermediate processing
going on during a block read.

I don't have a reference handy and I can't quote any performance statistics,
but I recall reading that Pascal beats CP/M on disk access, which is what
you would expect when reading half the sectors that go by instead of a third.

Apple DOS uses a "three-descending" interleaving scheme, which is equivalent
to "thirteen-ascending" and means there is a LOT of waiting between sectors
if you try to read them in ascending order.  A common optimization scheme
is to read the sectors in descending order to cut down on the wait time, but
that still leaves you with the equivalent of a "three-ascending" scheme,
the same as CP/M.

As everyone knows, there is no free lunch.  In order to get faster disk
access, you have to give up something.  In Pascal, what you give up is
chaining;  files are always allocated in sequential blocks instead of
being strung randomly around the disk.  This means you can occasionally
run out of room on a file because space on the disk is fragmented.
In practice, I have found that the problem is not serious (file compaction
is quick and easy and does not have to be done very often) and I gladly make 
the tradeoff.  

There is a second benefit:  because there are no chaining sectors, you get 
more space for actual data on each disk (274 out of 280 blocks to be exact, 
where a block is 512 bytes = 2 sectors, the smallest amount of data you can 
address on a Pascal disk).  That leaves 2 blocks for a boot program and
4 blocks for the disk directory.  The actual data storage per disk is
140,288 bytes out of 143,360.
-- 

Dave Seaman			"My hovercraft is full of eels."
..!pur-ee!pucc-i:ags

sdh@rabbit.UUCP () (06/30/84)

Sorry to contradict everything said so far, but THE fastest disk access
for apple is using a routine called RWT. No that wasn't a typo. I do
not mean RWTS. I mean Read/Write a Track. No sectors. Sectors slow 
the whole mess down.

There is a trade-off: convenience v. speed.

You have to copy these disks with a nibble copier, and its no good for
multiple file handling. It is great if you need reams of data (say for
a spelling correction program) very quickly.

I know of no such markewted utility, so you'd have to write your own
DOS. too bad.

Steve Hawley
<allegra,alice>!rabbit!sdh

barry@ames-lm.UUCP (Kenn Barry) (07/05/84)

[]
	Must correct the previous article - the DOS 3.3 skew is two-
descending, and this is the fastest possible sector arrangement, *if*
you patch DOS 3.3 so that the software is fast enough to read every other
sector. Without the patch, DOS 3.3 misses its first chance at each sector
and doesn't catch it 'til a full spin later. That's why it's so slooow.