gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] openCobol performances issues


From: Michael D. Setzer II
Subject: Re: [open-cobol-list] openCobol performances issues
Date: Sat, 13 Sep 2014 06:46:01 +1000

On 12 Sep 2014 at 13:47, ARCHAMBAULT Philippe wrote:

From:   ARCHAMBAULT Philippe <address@hidden>
To:     "address@hidden"
        <address@hidden>
Date sent:      Fri, 12 Sep 2014 13:47:52 +0000
Subject:        [open-cobol-list] openCobol performances issues

>
>     Hello,
>      
>     We are migrating from Pseries to Zseries  zLinux (redhat 6.4) and from 
> Microfocus
>     Cobol to GNUCobol 1.1, and on certains programs we see bad CPU Performance
>      
>      
>      
>     For examples this kind of test:
>      
>     Loop on add 1 to a variable define in PIC S9(09) binary     we see:
>                     AIX MFCobol     0,960 sec cpu                     /       
>         linux OCobol    16,411
>     sec CPU
>      
>     Same test on pic s9(03), pic 9(07), pic 9(10) Packed decimal, pic9(09) 
> comp-5 do same
>     results…
>      
>     Same result on xLinux (rh 6.4) on HPBlade
>      
>     sample program:
>      
>            IDENTIFICATION DIVISION.
>            PROGRAM-ID. TESTCOB.
>            ENVIRONMENT DIVISION.
>            CONFIGURATION SECTION.
>            INPUT-OUTPUT SECTION.
>            DATA DIVISION.
>            WORKING-STORAGE SECTION.
>            01  NumericArea.
>                02   nums99       pic s9(09) binary.
>            PROCEDURE DIVISION.
>            DEBUT-PROGRAMME.
>                move 0 to nums99
>                PERFORM 200000000 TIMES
>                      add 1 to nums99
>                end-perform.
>                stop run.
>      
>      
>     Any ideas ?

Did some quick testing, and found this?
Used Linux machine.
Original program compiled on machine (added display at end).

       IDENTIFICATION DIVISION.
       PROGRAM-ID. TESTCOB.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       INPUT-OUTPUT SECTION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  NumericArea.
           02   nums99 pic s9(09) binary.
       PROCEDURE DIVISION.
       DEBUT-PROGRAMME.
           move 0 to nums99
           PERFORM 200000000 TIMES
                   add 1 to nums99
           end-perform.
           Display nums99.
           stop run.

cobc -x -O2 coblooporg.cbl
time ./coblooporg
+200000000

real    0m15.862s
user    0m15.769s
sys     0m0.003s

Just changed variable definition
<            02   nums99 pic s9(09) binary.
---
>            02   nums99 binary-c-long signed.

cobc -x -O2 cobloop.cbl

time ./cobloop
+00000000000200000000

real    0m0.002s
user    0m0.000s
sys     0m0.001s

So, originaly got a speed like your 16 seconds, but after that one minor
change got a much better time??







>      
>      
>      
>      


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor
  Guam Community College  Computer Center
  mailto:address@hidden
  mailto:address@hidden
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins
  G4L Disk Imaging Project maintainer
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

address@hidden CREDITS
ROSETTA     19616734.793850   |   SETI        33119292.390468
ABC         16613838.513356   |   EINSTEIN    32606373.008230



reply via email to

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