× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: A Packed-Decimal Machine? (was Entry Parameters)
  • From: Jon.Paris@xxxxxxxxxx
  • Date: Fri, 21 Jan 2000 09:48:35 -0500



 >> says that the AS/400 is a packed decimal machine,

I don't believe the AS/400 is a packed machine - it operates in binary like most
any other system - but it is not an easy question to answer. The confusion here
(I think) stems from the fact that the AS/400 is a "soft" machine.  i.e. what we
often think of as the hardware is in fact a software layer over the hardware.
This of course is why we were able to switch from CISC to RISC without
recompiles etc. (although the system did a re-translate of course <bg>). This
confusion was aided by languages like RPG choosing to treat any numeric item as
if it were packed. The result being that a computation on a binary value was
often slower than a computation on a packed value because the binary was
converted to packed before the calculation and then the result was converted
back to binary.

To get an idea how big an effect this can have try coding a loop that does (say)
a multiply of one 5 digit integer by another 10,000 times.  Code the integers as
type B(inary), P(acked) and I(nteger) and compare the times taken. You should
find that I is fastest followed by P and then B.  The new optimizer on the Risc
400s may do enough work that the differences will not be as obvious as they used
to be but .....



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.