HOME  NEWS  FORUM  DOWNLOAD  LINK
OpenCOBOL - an open-source COBOL compiler
Main Menu
Download
Documentation
Development
Who's Online
18 user(s) are online (4 user(s) are browsing Forum)

Members: 0
Guests: 18

more...
Powered by
SourceForge

Xoops

Creative Commons

OpenCOBOL Forum Index
   OpenCOBOL
     Simple cobol benchmark...
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
human
Posted on: 2012/8/31 8:34
Home away from home
Joined: 2007/5/15
From: GERMANY
Posts: 1416
Re: Simple cobol benchmark...
I'd would suggest to insert
       01  ws-sav-time.
               03 ws-sav-date-hour           pic x(02).
               03 ws-sav-date-minute         pic x(02).
               03 ws-sav-date-second         pic x(02).
               03 ws-sav-date-millisecond    pic x(02).
       77  ws-cnt-same                       pic 9(05).
and change the display part to something like
           If ws-current-time not = ws-sav-time
              Move space to ws-x-30
              if ws-cnt-same not = 0
                 String " (stayed for " 
                        ws-cnt-same
                        " loops)"
                    delimited by size
                    into ws-x-30
                 end-string
                 move 0               to ws-cnt-same
              end-if 
      ** Display cycles / line break
              Display ws-x-30 end-display            
              move ws-current-time to ws-sav-time
      ** Format for display.
              Move space to ws-x-30
              String ws-current-date-hour
                     ":"                 
                     ws-current-date-minute
                     ":"                   
                     ws-current-date-second
                     "."                   
                     ws-current-date-millisecond
                 delimited by size
                 into ws-x-30
              end-string
      ** Display it.
              Display ws-x-30 with no advancing end-display
           else
              add 1 to ws-cnt-same end-add
           end-if
           continue.
       sc-exit.
           Exit.  
this should result in much less displays/write to >logfile.

Simon 'human' Sobisch
federico
Posted on: 2012/8/31 12:30
Home away from home
Joined: 2010/2/7
From:
Posts: 220
Re: Simple cobol benchmark...
These results with Opencobol 1.1 binary package on a Intel(R) Core(TM)2 Duo CPU E7500 @2.93.Ghz 3,24 GB RAM XP Pro Service pack 3

Opencobol GCC 3.4.5 Gary's version (It was built using Berkeley Database V5.0.26, GMP V5.0.1 and PDCurses V4.3.

Elapsed time 00 min:00 sec: 00 hundredths 27 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 83 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 39 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 37 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 03 for READ
Elapsed time 00 min:00 sec: 00 hundredths 30 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 19 for COMPLETE TEST




Opencobol Microsoft Visual Express C++ 2008 (built from me using the opencobol.org tarball with VISAM BMP and PDCurses kindly received from Human.


Elapsed time 00 min:00 sec: 00 hundredths 32 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 42 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 29 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 18 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 06 for READ
Elapsed time 00 min:00 sec: 00 hundredths 28 for DELETE
Elapsed time 00 min:00 sec: 01 hundredths 55 for COMPLETE TEST




RES COBOL TO JAVA translator

C:\RES\cobol>java -cp .;classes12.jar;..\RES.jar cobolprogramclasses.Bench01


Elapsed time 0 min:0 sec: 6 hundredths 19 for COMPUTE                       
Elapsed time 0 min:0 sec: 30 hundredths 31 for UNSTRING                      
Elapsed time 0 min:0 sec: 14 hundredths 42 for STRING                        
Elapsed time 0 min:0 sec: 8 hundredths 77 for WRITE                         
Elapsed time 0 min:0 sec: 4 hundredths 61 for READ                          
Elapsed time 0 min:0 sec: 4 hundredths 55 for DELETE                        
Elapsed time 0 min:1 sec: 8 hundredths 85 for COMPLETE TEST                 



ps. unfortunately it goes in exception for I/O so I can suppose its time worse then normal...at least for the file isam test... the others are far from being comparable to opencobol performances.

Of course, all test were executed at the same PC.

Federico
human
Posted on: 2012/9/3 7:38
Home away from home
Joined: 2007/5/15
From: GERMANY
Posts: 1416
Re: Simple cobol benchmark...
According to http://opencobol2java.sourceforge.net/#timings one should use "-opt1"/"-opt2" when creating Bench.01. You may want to add 2 benchmarks with these compile switches (I suggest to edit your post and if you don't mind, surround the benchmarks with code tags for easier readability)?

Simon 'human' Sobisch
federico
Posted on: 2012/9/3 16:32
Home away from home
Joined: 2010/2/7
From:
Posts: 220
Re: Simple cobol benchmark...
The java version was compiled with this batch


java -jar ..\RES.jar -c3 -v  -opt2 -dp1 -overwrite -free BENCH01.cob

java -jar ..\RES.jar -opt2 -gendb -c3  -dp1 -overwrite BENCH01.COB 
javac -cp .;..\RES.jar cobolprogramclasses\Bench01.java
java -cp .;classes12.jar;..\RES.jar  cobolprogramclasses.Bench01 -createtables 



That seems to be the best version. However I would like to say that the programmer who wrote the RES utility did a great work ! I got really surprised looking the cobol moving to a java class so fine.

Of course since java is running into a VM it won't be faster then OpenCOBOL that is a optimized build. But the goeal of this benchmark is giving us and idea abot the global performance of it (in general).

Federico
ps. I [code]ed my previous message...






human
Posted on: 2012/9/5 15:17
Home away from home
Joined: 2007/5/15
From: GERMANY
Posts: 1416
Re: Simple cobol benchmark...
Results on same machine with with VC 2010 Express,

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 1.1CE_120905 x86 (on x64)
Elapsed time 00 min:00 sec: 00 hundredths 23 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 43 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 29 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 31 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 23 for READ
Elapsed time 00 min:00 sec: 00 hundredths 61 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 14 for COMPLETE TEST

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 1.1CE_120905 x64
Elapsed time 00 min:00 sec: 00 hundredths 21 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 39 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 28 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 31 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 21 for READ
Elapsed time 00 min:00 sec: 00 hundredths 55 for DELETE
Elapsed time 00 min:00 sec: 01 hundredths 97 for COMPLETE TEST


WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 2.0dev x86 (on x64)
Elapsed time 00 min:00 sec: 00 hundredths 22 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 42 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 33 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 29 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 29 for READ
Elapsed time 00 min:00 sec: 00 hundredths 63 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 18 for COMPLETE TEST

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 2.0dev x64
Elapsed time 00 min:00 sec: 00 hundredths 16 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 38 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 26 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 25 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 23 for READ
Elapsed time 00 min:00 sec: 00 hundredths 58 for DELETE
Elapsed time 00 min:00 sec: 01 hundredths 86 for COMPLETE TEST

There were no significant differences when cobc -O2 was used (bench.cbl is to simple to take effect).

Compiled with runtime-checks (cobc -debug), what I always suggest to do:

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 1.1CE_120905 x86 (on x64), runtime-checks enabled
Elapsed time 00 min:00 sec: 00 hundredths 86 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 45 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 34 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 36 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 27 for READ
Elapsed time 00 min:00 sec: 00 hundredths 61 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 91 for COMPLETE TEST

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 1.1CE_120905 x64, runtime-checks enabled
Elapsed time 00 min:00 sec: 00 hundredths 59 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 42 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 33 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 25 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 24 for READ
Elapsed time 00 min:00 sec: 00 hundredths 58 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 42 for COMPLETE TEST

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 2.0dev x86 (on x64), runtime-checks enabled
Elapsed time 00 min:00 sec: 00 hundredths 70 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 49 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 39 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 27 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 30 for READ
Elapsed time 00 min:00 sec: 00 hundredths 67 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 85 for COMPLETE TEST

WIN7 x64 Pentium E6600 @ 3.06GHz OpenCOBOL 2.0dev x64, runtime-checks enabled
Elapsed time 00 min:00 sec: 00 hundredths 53 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 44 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 33 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 23 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 24 for READ
Elapsed time 00 min:00 sec: 00 hundredths 59 for DELETE
Elapsed time 00 min:00 sec: 02 hundredths 36 for COMPLETE TEST

Simon 'human' Sobisch
ska
Posted on: 2012/9/13 5:00
Just can't stay away
Joined: 2008/3/17
From: NYC
Posts: 145
Re: Simple cobol benchmark...
Just my 2 cents

Here is the data for AMD4800 - 8-years old PC (WinXP x64 which is basically 2003), but that's not the major point.

OC 1.1 CE 32-bit my build native Windows VS2008 (MPIR,VBISAM):

Elapsed time 00 min:00 sec: 00 hundredths 64 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 91 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 62 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 36 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 17 for READ
Elapsed time 00 min:00 sec: 00 hundredths 41 for DELETE
Elapsed time 00 min:00 sec: 03 hundredths 13 for COMPLETE TEST


MERANT Micro Focus Net Express V3
Version 3.1.11 Copyright (C) 1984-2000 MERANT International Ltd.
- very OLD version


Elapsed time 00 min:00 sec: 00 hundredths 08 for COMPUTE
Elapsed time 00 min:00 sec: 00 hundredths 36 for UNSTRING
Elapsed time 00 min:00 sec: 00 hundredths 41 for STRING
Elapsed time 00 min:00 sec: 00 hundredths 17 for WRITE
Elapsed time 00 min:00 sec: 00 hundredths 05 for READ
Elapsed time 00 min:00 sec: 00 hundredths 11 for DELETE
Elapsed time 00 min:00 sec: 01 hundredths 18 for COMPLETE TEST


And that is first of all about the quality of the runtime libraries, and about COMP-3.
I've said about 7 years ago that we need to move OC from C to pure C++ (in codegen) to be able to use COMP3 templates instead of slow GMP/MPIR


----------------
Regards,
Sergey

« 1 2 (3)
Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 
Copyright (C) 2005 The OpenCOBOL Project. All rights reserved.
Powered by Xoops2 | PHP | MySQL | Apache
ocean-net