C needs BCD -- why BCD? Accountants!

Geoff Kuenning geoff at desint.UUCP
Thu Nov 29 10:04:45 AEST 1984


In article <257 at rlgvax.UUCP> guy at rlgvax.UUCP (Guy Harris) writes:

>Ummmmmmm... isn't there any seek time in there?  Even with IBMish track-at-
>a-time reads the heads'll have to move *some*time - and if you're not doing
>sequential access of a batch file, but, say, a transaction processing
>application they'll be moving more than that.

It's not how much you read at once, it's how the filesystem organizes data.
If your data is contiguous, we are talking 3-6ms to step to the next cylinder;
on an Eagle this occurs only once every ~900 blocks (I don't remember the
exact shape of that disk).

Certainly transaction processing applications are dominated by seek time.  But
a lot of business processing (probably most) is done in batch mode.  That's
why they put so much effort into sort programs.

>For that matter, what if the operation involves multiplication or, worse,
>division?  BCD *adds* can be done quickly (even 4/8 digits in parallel), but
>multiplications and divisions are a major pain.

Again, true.  But how much business processing involves multiplication,
compared to the amount of simple addition and subtraction?  Interest rates and
taxes are two, but most business arithmetic is simple.  The IBM 1401 (which
was designed for business) didn't even have a multiply instruction, and if you
bought the option it operated by repeated addition (we're talking decrementing
the multiplier for each addition here folks -- no shifting at all!).
-- 

	Geoff Kuenning
	...!ihnp4!trwrb!desint!geoff



More information about the Comp.lang.c mailing list