× 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: Packed vs Integer (Was RE: V4R5?)
  • From: Blair Wyman <wyman@xxxxxxxxxxxx>
  • Date: Thu, 13 Apr 2000 17:41:32 -0500 (CDT)

Excerpts from midrange-l: 13-Apr'00 Packed vs Integer (Was RE: .. "Bob
Crothers"@cstoneind (931*) 

> > 3) Arithmetic happens in 
> > integer format (not packed), so your arithmetic expressions 
> >  perform faster. 

> I always thought the "native" format of the AS/400 was packed.  And 
> operations against packed numbers where the fastest.  Is this not true? 

While packed is a datatype at the MI, arithmetic operations on packed
values are not as fast as straight two's complement arithmetic
operations on integers.  (On the PowerPC integer math instructions take
one processor cycle each.) 

Of course, the range of the packed data type is *much* larger than that
of integers (and provides for fractional parts) so it's another classic
trade-off between speed and utility. 

> Or is it more like: Packed is faster than zoned, but binary/integer is 
> faster than packed? 

Integer is decidedly the fastest.  IIRC, all zoned values are converted
to packed before an arithmetic operation, and the packed result is
converted back to zoned before being stored/returned. 

> When did this change? 

AFAIK it hasn't.  :-) 

-blair 

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 ...

Replies:

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.