× 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.



gee, I thought the question was rhetorical...

on a RISC processor? Int is the fastest, no question.
on a Pentium? Int is the fastest, no question.
on a System/38? Depends what model you were on. Later in life, around the
time of the PL/I debacle, I believe they added a floating point processor to
the complex. And somewhere around that time or later, in the 400, the int
took over from packed.
As for the 400, it you're using ILE, I believe that you will find that Int
rules.

===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified Specialist - iSeries Administrator
 -- IBM Certified Specialist - RPG IV Developer

"Suppose you were an idiot...
  And suppose you were a member of Congress...
  But I repeat myself."
    - Mark Twain

----- Original Message -----
From: "Buck Calabro" <Buck.Calabro@commsoft.net>
To: <rpg400-l@midrange.com>
Sent: Wednesday, February 06, 2002 1:24 PM
Subject: Performance of Zoned vs Int vs Packed


> Bob wondered:
>
> >So are Packed Fields still faster
> >performers than say Int's on this new
> >hardware?
>
> Anecdotal evidence tells me that Int is the fastest but int's don't work
for
> many business transactions that involve money (decimals) although Binary
> does.
>
> To test my assumptions, I ran some loops with no optimisation.  50k
> iterations, 500k and 5 million.  Times are in seconds.
>
> Definition  50k  500k  5m
> 10s 0        0     3   32
> 10p 0        1     2   33
> 10i 0        0     0    1
>  9b 0        0     4   59
>  9s 0        0     3   29
>  9p 0        0     2   30
>
> I won't bother with my machine/memory, etc. because all I'm interested in
is
> the relative difference, not whether an 820 is faster than a P02.  Here's
> sample code:
>
> d LIMIT           c                   const(5000000)
> d start           s               t
> d stop            s               t
> d diff            s             10i 0
>
> d numZ10          s             10s 0
> d numP10          s             10p 0
> d numI10          s             10i 0
> d numB09          s              9b 0
> d numZ09          s              9s 0
> d numP09          s              9p 0
>
> c                   eval      numZ10 = LIMIT
> c                   time                    start
> c                   do        numZ10
> c                   enddo
> c                   time                    stop
> c     stop          subdur    start         diff:*s
> c     diff          dsply
>
> One loop for each "num" D-spec above...
>   --buck
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>



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.