Re: Cobol Myth Busters
- From: Robert <no@xxxxxx>
- Date: Tue, 04 Sep 2007 21:37:41 -0500
On Tue, 04 Sep 2007 05:10:29 GMT, "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote:
Binary (when working with other Binary) may or may not be faster than PD for
some cases on zSeries. However, there are even MORE options that impact this
than just TRUNC (wich has 3 flavors on IBM zSeries). Furthermore, PD is usually
(not always) BEST when working with "combined" usages (such as input from a
"screen" in the same operation as something stored in a Database).
The following is the information on "comapring data types" for the Enterprise
COBOL Performance paper available at:
http://www-1.ibm.com/support/docview.wss?rs=203&q=7001475&uid=swg27001475
(You might want to look at the entire paper to see what a COMPREHENVISE set of
performance test covers - in the way of "variations. Also it has some firm
statistics on indexes vs subscripts with this compiler.)
It says an index is 30% faster than a binary subscript. Subscripts require a
multiplication. Both require the addition of base + offset, which is usually 'free', i.e.
the referencing operand is base:index. So the difference is multiply versus load. Machines
can do either in one execution frame. The difference is pipelining -- the load might be
done before the instruction executes.
Comparing Data Types
When selecting your data types, it is important to understand the performance
characteristics of them before you use them. Shown below are some performance
considerations of doing several ADDs and SUBTRACTs on the various data types of
the specified precision.
Performance considerations for comparing data types (using ARITH(COMPAT)):
Packed decimal (COMP-3) compared to binary (COMP or COMP-4) with TRUNC(STD)
using 1 to 9 digits: packed decimal is 30% to 60% slower than binary
using 10 to 17 digits: packed decimal is 55% to 65% faster than binary
using 18 digits: packed decimal is 74% faster than binary
Packed decimal (COMP-3) compared to binary (COMP or COMP-4) with TRUNC(OPT)
using 1 to 8 digits: packed decimal is 160% to 200% slower than binary
using 9 digits: packed decimal is 60% slower than binary
using 10 to 17 digits: packed decimal is 150% to 180% slower than binary
using 18 digits: packed decimal is 74% faster than binary
I don't understand why 9 and 18 digits are special cases. A 32 bit number holds 4294967296
(9.4 digits) ; a 64 bit number holds 18446744073709551616 (19.1 digits). It appears that
IBM 'reserves' 2 bits out of 32 and 5 bits out of 64.
.
- Follow-Ups:
- Re: Cobol Myth Busters
- From: William M. Klein
- Re: Cobol Myth Busters
- References:
- Cobol Myth Busters
- From: Robert
- Re: Cobol Myth Busters
- From: Clark F Morris
- Re: Cobol Myth Busters
- From: Robert
- Re: Cobol Myth Busters
- From: William M. Klein
- Cobol Myth Busters
- Prev by Date: IBMCOMP (was Cobol Myth Busters
- Next by Date: Re: Cobol Myth Busters
- Previous by thread: Re: Cobol Myth Busters
- Next by thread: Re: Cobol Myth Busters
- Index(es):
Relevant Pages
|