gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] displaying max values in comp-5 field


From: vince coen
Subject: Re: [open-cobol-list] displaying max values in comp-5 field
Date: Tue, 28 Jul 2009 17:23:04 +0100
User-agent: KMail/1.9.6

Hi;

Interesting diffs between binary and comp despite the fields are the same.
On mine I added binary-long for a new test at the end and got:

address@hidden Stock]$ cobc -fnotrunc -X -x mathtest.cbl
address@hidden Stock]$ ./mathtest
USAGE DISPLAY:   0.53 SECONDS
USAGE COMP:      0.05 SECONDS
USAGE COMP-5:    0.03 SECONDS
USAGE BINARY:    0.06 SECONDS
USAGE Bin-long:    0.03 SECONDS

address@hidden Stock]$ cobc  -x mathtest.cbl
address@hidden Stock]$ ./mathtest
USAGE DISPLAY:   3.43 SECONDS
USAGE COMP:      1.64 SECONDS
USAGE COMP-5:    0.03 SECONDS
USAGE BINARY:    1.68 SECONDS
USAGE Bin-long:    0.03 SECONDS

now with added -debug

address@hidden Stock]$ cobc -debug -fnotrunc -X -x mathtest.cbl
address@hidden Stock]$ ./mathtest
USAGE DISPLAY:   1.13 SECONDS
USAGE COMP:      0.17 SECONDS
USAGE COMP-5:    0.14 SECONDS
USAGE BINARY:    0.17 SECONDS
USAGE Bin-long:    0.13 SECONDS

and

address@hidden Stock]$ cobc -debug -X -x mathtest.cbl
address@hidden Stock]$ ./mathtest
USAGE DISPLAY:   3.82 SECONDS
USAGE COMP:      1.71 SECONDS
USAGE COMP-5:    0.14 SECONDS
USAGE BINARY:    1.71 SECONDS
USAGE Bin-long:    0.13 SECONDS

So look at the binary-long figures .....


No change between with -fnotruc and without.
Also that -debug adds a fair bit  more on to the runtime for both test groups, 
although that said more than likely, not anything significant during normal 
processing (ie, without lots of computations).

PS. My comments regarding truncation relates to compilers doing their thing as 
against what I as a programmer wishes. My way its doing what 'I expect' and 
not the compilers specific default which can vary between compilers and yes I 
have seen such differences even between same compiler on m/f at different 
sites because of variation in specific vversion of compiler and site setup 
param for the compiler etc. There again I have been using Cobol compilers 
since 1961. Sticking to Cobol standards does maintain some resemblance of 
regular complience for expected results,    
but I have no intention of putting a bet on it.

 
Vince


On Tuesday 28 July 2009, address@hidden wrote:
> Very significant difference! Great info Gary!
>
> $ cobc -x -fnotrunc -o mathtest ./mathtest.cob
> $ ./mathtest
> USAGE DISPLAY:   1.00 SECONDS
> USAGE COMP:      0.06 SECONDS
> USAGE COMP-5:    0.06 SECONDS
> USAGE BINARY:    0.06 SECONDS
> $ cobc -x  -o mathtest ./mathtest.cob
> $ ./mathtest
> USAGE DISPLAY:   6.61 SECONDS
> USAGE COMP:      3.25 SECONDS
> USAGE COMP-5:    0.06 SECONDS
> USAGE BINARY:    3.23 SECONDS
> $ ./mathtest
> USAGE DISPLAY:   6.62 SECONDS
> USAGE COMP:      3.25 SECONDS
> USAGE COMP-5:    0.06 SECONDS
> USAGE BINARY:    3.23 SECONDS
> $ cobc -x -fnotrunc -o mathtest ./mathtest.cob
> $ ./mathtest
> USAGE DISPLAY:   1.00 SECONDS
> USAGE COMP:      0.06 SECONDS
> USAGE COMP-5:    0.06 SECONDS
> USAGE BINARY:    0.06 SECONDS
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]