From: Jeff Campbell on
Robert wrote:
> On Sat, 22 Sep 2007 15:30:07 -0400, "Charles Hottel" <chottel(a)earthlink.net> wrote:
>
>> "Robert" <no(a)e.mail> wrote in message
>> news:3kcaf394t2qabq20kh2beeu413ujua7gp6(a)4ax.com...
>>> On Sat, 22 Sep 2007 03:20:19 -0600, Jeff Campbell <n8wxs(a)arrl.net> wrote:
>>>
>>>> Robert wrote:
>>>>> On Fri, 21 Sep 2007 11:09:16 GMT, "William M. Klein"
>>>>> <wmklein(a)nospam.netcom.com> wrote:
>>>>>
>>>>>> "Robert" <no(a)e.mail> wrote in message
>>>>>> news:i3j6f3pa7ucignv34t4oklno0ht8jh2c5p(a)4ax.com...
>>>>>>> On Fri, 21 Sep 2007 04:21:35 GMT, "William M. Klein"
>>>>>>> <wmklein(a)nospam.netcom.com> wrote:
>>>>>>>
>>>>>> <snip>
>>>>>>> I and Richard posted facts showing speed is the same. We have not seen
>>>>>>> facts
>>>>>>> from
>>>>>>> mainframe-land,except a five year old study. Just post some facts and
>>>>>>> skip the
>>>>>>> ad homina.
>>>>>> I do NOT have personal access to an Enterprise V3.4 COBOL compiler -
>>>>>> and I do
>>>>>> believe what IBM says about its performance (and don't believe that you
>>>>>> know how
>>>>>> they implement all their syntax -> machine code). HOWEVER,
>>>>>>
>>>>>> If you create a source program that you think tests subscripts vs
>>>>>> indexes
>>>>>> (whether it is comprehensive or not), then I think some CLC person
>>>>>> might compile
>>>>>> and run it for you.
>>>>>>
>>>>>> Therefore, please create and post a sample program that cleanly
>>>>>> compiles with
>>>>>> the Micro Focus directives:
>>>>>> NOMF DIALECT(ENTCOBOL) FLAGAS(S)
>>>>>>
>>>>>> If you are not using a current-enough version of Server Express to
>>>>>> include
>>>>>> support for the DIALECT directive, then use:
>>>>>> NOMF ENTCOBOL FLAG(ENTCOBOL) FLAGAS(S) ARITHMETIC(ENTCOBOL)
>>>>>> PERFORM-TYPE(ENTCOBOL)
>>>>> That's not necessary. The code I posted is Standard-compliant except for
>>>>> comp-5, which we
>>>>> all know IBM can handle.
>>>> No, it wasn't. Such things as mixed sectioned, non-sectioned code; exit
>>>> section statements not in separate paragraphs; linkage section declared
>>>> without a using clause in the procedure division. I could go on.
>>> Those things were in the first test, named speed1. The subscript v. index
>>> test, named
>>> speed2, does not have them.
>>>
>>> The current '02 Standard does not prohibit any of the things you
>>> mentioned. Especially, it
>>> does not require exit section to be in a separate paragraph, nor under a
>>> paragraph name.
>>>
>>>>>> If you post such a program and no one else in CLC compiles and runs it
>>>>>> (and
>>>>>> posts the results) I will find someone who can and will.
>>>>> Any volunteers?
>> Speed1 is the only program I saw posted. When did you post it? I just
>> searched Google groups for "speed2" and got no hits.
>
> I TOLD them these damned computer things would never work, but they wouldn't listen. :)
>
> Here it is again. If your compiler doesn't support exit perform cycle, just take it out.
>
>
> * ------ Speed of subscript v. index
> ------------------------------------------------------
> * Findings
>
> * Index 23
> * Subscript 23
> * Subscript comp-5 23
> * Index 1 23
> * Subscript 1 18
> * Subscript 1 comp-5 18
>
>
> $SET SOURCEFORMAT"FREE"
> $SET NOBOUND
> $SET OPT"2"
> $SET NOTRUNC
> $SET IBMCOMP
> $SET NOCHECK
> $SET ALIGN"8"
> identification division.
> program-id. Speed2.
> author. Robert Wxagner.
>
> data division.
> working-storage section.
> 01 test-data.
> 05 comp5-number comp-5 pic s9(09) sync.
>
> 05 binary-number binary pic s9(09) sync.
> 05 display-number pic 9(09).
> 05 packed-number comp-3 pic s9(09).
> 05 s-subscript binary pic s9(09) sync.
> 05 test-byte pic x(01).
>
> 01 misaligned-area.
> 05 array-element occurs 4096 indexed x-index.
> 10 misaligned-number comp-5 pic s9(09).
> 10 to-cause-misalignment pic x(01).
> 05 byte-element occurs 4096 indexed x-index-1 pic x.
>
> 01 timer-variables.
> 05 test-name pic x(30).
> 05 repeat-factor value 100000000 binary pic s9(09).
> 05 current-date-structure.
> 10 pic x(08).
> 10 time-now-hhmmsshh.
> 15 hours pic 9(02).
> 15 minutes pic 9(02).
> 15 secs pic 9(02).
> 15 hundredths pic v9(02).
> 10 pic x(05).
> 05 time-now pic 9(06)v99.
> 05 time-start pic 9(06)v99.
> 05 timer-overhead value zero pic 9(06)v99.
> 05 elapsed-time pic s9(06)v99.
> 05 elapsed-time-display.
> 10 elapsed-time-edited pic z(05).
>
>
> procedure division.
>
> initialize test-data, misaligned-area
>
> move 'Null test' to test-name
> perform timer-on
> perform timer-on
> perform repeat-factor times
> exit perform cycle
> end-perform
> perform timer-off
> compute timer-overhead = (time-now - time-start)
>
> move 'Index' to test-name
> set x-index to 1000
> perform timer-on
> perform repeat-factor times
> if x-index = 1000
> set x-index up by 1
> else
> set x-index down by 1
> end-if
> move array-element (x-index) to test-byte
> exit perform cycle
> end-perform
> perform timer-off
>
> move 'Subscript' to test-name
> move 1000 to s-subscript
> perform timer-on
> perform repeat-factor times
> if s-subscript = 1000
> add 1 to s-subscript
> else
> subtract 1 from s-subscript
> end-if
> move array-element (s-subscript) to test-byte
> exit perform cycle
> end-perform
> perform timer-off
>
> move 'Subscript comp-5' to test-name
> move 1000 to comp5-number
> perform timer-on
> perform repeat-factor times
> if comp5-number = 1000
> add 1 to comp5-number
> else
> subtract 1 from comp5-number
> end-if
> move array-element (comp5-number) to test-byte
> exit perform cycle
> end-perform
> perform timer-off
>
> move 'Index 1' to test-name
> set x-index-1 to 1000
> perform timer-on
> perform repeat-factor times
> if x-index-1 = 1000
> set x-index-1 up by 1
> else
> set x-index-1 down by 1
> end-if
> move byte-element (x-index-1) to test-byte
> exit perform cycle
> end-perform
> perform timer-off
>
> move 'Subscript 1' to test-name
> move 1000 to s-subscript
> perform timer-on
> perform repeat-factor times
> if s-subscript = 1000
> add 1 to s-subscript
> else
> subtract 1 from s-subscript
> end-if
> move byte-element (s-subscript) to test-byte
> exit perform cycle
> end-perform
> perform timer-off
>
> move 'Subscript 1 comp-5' to test-name
> move 1000 to comp5-number
> perform timer-on
> perform repeat-factor times
> if comp5-number = 1000
> add 1 to comp5-number
> else
> subtract 1 from comp5-number
> end-if
> move byte-element (comp5-number) to test-byte
> exit perform cycle
> end-perform
> perform timer-off
>
> goback
>
> . timer-on.
> perform read-the-time
> move time-now to time-start
> . timer-off.
> perform read-the-time
> compute elapsed-time rounded = ((time-now - time-start)
> * 100000000 / repeat-factor) - timer-overhead
>
> if elapsed-time not greater than zero
> move 'error' to elapsed-time-display
> else
> compute elapsed-time-edited rounded = elapsed-time * 10
> end-if
> display test-name elapsed-time-display
> . read-the-time.
> accept time-now-hhmmsshh from time
> *> move function current-date to current-date-structure
> compute time-now =
> ((((hours * 60) +
> minutes) * 60) +
> secs) +
> hundredths
> .
>
Here are the results I got:

Null test 0
Index 24
Subscript 20
Subscript comp-5 20
Index 1 24
Subscript 1 20
Subscript 1 comp-5 20

Jeff

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
From: William M. Klein on
Jeff,
Where did you run your test (O/S, machine, and COBOL compiler)?

--
Bill Klein
wmklein <at> ix.netcom.com
"Jeff Campbell" <n8wxs(a)arrl.net> wrote in message
news:1190702153_6619(a)sp12lax.superfeed.net...
> Robert wrote:
>> On Sat, 22 Sep 2007 15:30:07 -0400, "Charles Hottel" <chottel(a)earthlink.net>
>> wrote:
>>
>>> "Robert" <no(a)e.mail> wrote in message
>>> news:3kcaf394t2qabq20kh2beeu413ujua7gp6(a)4ax.com...
>>>> On Sat, 22 Sep 2007 03:20:19 -0600, Jeff Campbell <n8wxs(a)arrl.net> wrote:
>>>>
>>>>> Robert wrote:
>>>>>> On Fri, 21 Sep 2007 11:09:16 GMT, "William M. Klein"
>>>>>> <wmklein(a)nospam.netcom.com> wrote:
>>>>>>
>>>>>>> "Robert" <no(a)e.mail> wrote in message
>>>>>>> news:i3j6f3pa7ucignv34t4oklno0ht8jh2c5p(a)4ax.com...
>>>>>>>> On Fri, 21 Sep 2007 04:21:35 GMT, "William M. Klein"
>>>>>>>> <wmklein(a)nospam.netcom.com> wrote:
>>>>>>>>
>>>>>>> <snip>
>>>>>>>> I and Richard posted facts showing speed is the same. We have not seen
>>>>>>>> facts
>>>>>>>> from
>>>>>>>> mainframe-land,except a five year old study. Just post some facts and
>>>>>>>> skip the
>>>>>>>> ad homina.
>>>>>>> I do NOT have personal access to an Enterprise V3.4 COBOL compiler - and
>>>>>>> I do
>>>>>>> believe what IBM says about its performance (and don't believe that you
>>>>>>> know how
>>>>>>> they implement all their syntax -> machine code). HOWEVER,
>>>>>>>
>>>>>>> If you create a source program that you think tests subscripts vs
>>>>>>> indexes
>>>>>>> (whether it is comprehensive or not), then I think some CLC person might
>>>>>>> compile
>>>>>>> and run it for you.
>>>>>>>
>>>>>>> Therefore, please create and post a sample program that cleanly compiles
>>>>>>> with
>>>>>>> the Micro Focus directives:
>>>>>>> NOMF DIALECT(ENTCOBOL) FLAGAS(S)
>>>>>>>
>>>>>>> If you are not using a current-enough version of Server Express to
>>>>>>> include
>>>>>>> support for the DIALECT directive, then use:
>>>>>>> NOMF ENTCOBOL FLAG(ENTCOBOL) FLAGAS(S) ARITHMETIC(ENTCOBOL)
>>>>>>> PERFORM-TYPE(ENTCOBOL)
>>>>>> That's not necessary. The code I posted is Standard-compliant except for
>>>>>> comp-5, which we
>>>>>> all know IBM can handle.
>>>>> No, it wasn't. Such things as mixed sectioned, non-sectioned code; exit
>>>>> section statements not in separate paragraphs; linkage section declared
>>>>> without a using clause in the procedure division. I could go on.
>>>> Those things were in the first test, named speed1. The subscript v. index
>>>> test, named
>>>> speed2, does not have them.
>>>>
>>>> The current '02 Standard does not prohibit any of the things you mentioned.
>>>> Especially, it
>>>> does not require exit section to be in a separate paragraph, nor under a
>>>> paragraph name.
>>>>
>>>>>>> If you post such a program and no one else in CLC compiles and runs it
>>>>>>> (and
>>>>>>> posts the results) I will find someone who can and will.
>>>>>> Any volunteers?
>>> Speed1 is the only program I saw posted. When did you post it? I just
>>> searched Google groups for "speed2" and got no hits.
>>
>> I TOLD them these damned computer things would never work, but they wouldn't
>> listen. :)
>>
>> Here it is again. If your compiler doesn't support exit perform cycle, just
>> take it out.
>>
>>
>> * ------ Speed of subscript v. index
>> ------------------------------------------------------
>> * Findings
>> * Index 23
>> * Subscript 23
>> * Subscript comp-5 23
>> * Index 1 23
>> * Subscript 1 18
>> * Subscript 1 comp-5 18
>>
>>
>> $SET SOURCEFORMAT"FREE"
>> $SET NOBOUND
>> $SET OPT"2"
>> $SET NOTRUNC
>> $SET IBMCOMP
>> $SET NOCHECK $SET ALIGN"8"
>> identification division.
>> program-id. Speed2.
>> author. Robert Wxagner.
>>
>> data division.
>> working-storage section.
>> 01 test-data. 05
>> comp5-number comp-5 pic s9(09) sync.
>>
>> 05 binary-number binary pic s9(09) sync. 05
>> display-number pic 9(09). 05 packed-number
>> comp-3 pic s9(09). 05 s-subscript binary
>> pic s9(09) sync. 05 test-byte pic x(01).
>> 01 misaligned-area.
>> 05 array-element occurs 4096 indexed x-index.
>> 10 misaligned-number comp-5 pic s9(09).
>> 10 to-cause-misalignment pic x(01). 05 byte-element
>> occurs 4096 indexed x-index-1 pic x. 01 timer-variables.
>> 05 test-name pic x(30).
>> 05 repeat-factor value 100000000 binary pic s9(09).
>> 05 current-date-structure.
>> 10 pic x(08).
>> 10 time-now-hhmmsshh.
>> 15 hours pic 9(02).
>> 15 minutes pic 9(02).
>> 15 secs pic 9(02).
>> 15 hundredths pic v9(02).
>> 10 pic x(05).
>> 05 time-now pic 9(06)v99.
>> 05 time-start pic 9(06)v99.
>> 05 timer-overhead value zero pic 9(06)v99.
>> 05 elapsed-time pic s9(06)v99.
>> 05 elapsed-time-display. 10 elapsed-time-edited
>> pic z(05).
>> procedure division.
>> initialize test-data, misaligned-area move 'Null test' to
>> test-name
>> perform timer-on
>> perform timer-on
>> perform repeat-factor times
>> exit perform cycle
>> end-perform
>> perform timer-off
>> compute timer-overhead = (time-now - time-start) move 'Index' to
>> test-name set x-index to 1000
>> perform timer-on perform repeat-factor times
>> if x-index = 1000
>> set x-index up by 1
>> else
>> set x-index down by 1
>> end-if move array-element (x-index) to test-byte exit perform
>> cycle end-perform
>> perform timer-off move 'Subscript' to test-name move
>> 1000 to s-subscript perform timer-on
>> perform repeat-factor times if s-subscript = 1000 add 1 to
>> s-subscript else subtract 1 from s-subscript
>> end-if move array-element (s-subscript) to test-byte
>> exit perform cycle
>> end-perform
>> perform timer-off move 'Subscript comp-5' to test-name
>> move 1000 to comp5-number perform timer-on
>> perform repeat-factor times if comp5-number = 1000 add 1
>> to comp5-number else subtract 1 from
>> comp5-number end-if move array-element
>> (comp5-number) to test-byte exit perform cycle
>> end-perform
>> perform timer-off move 'Index 1' to test-name set
>> x-index-1 to 1000 perform timer-on
>> perform repeat-factor times if x-index-1 = 1000
>> set x-index-1 up by 1
>> else
>> set x-index-1 down by 1
>> end-if move byte-element (x-index-1) to test-byte exit perform
>> cycle end-perform
>> perform timer-off move 'Subscript 1' to test-name move
>> 1000 to s-subscript perform timer-on
>> perform repeat-factor times if s-subscript = 1000 add 1 to
>> s-subscript else subtract 1 from s-subscript
>> end-if move byte-element (s-subscript) to test-byte
>> exit perform cycle
>> end-perform
>> perform timer-off move 'Subscript 1 comp-5' to test-name
>> move 1000 to comp5-number perform timer-on
>> perform repeat-factor times if comp5-number = 1000 add
>> 1 to comp5-number else subtract 1 from
>> comp5-number end-if move byte-element
>> (comp5-number) to test-byte exit perform cycle
>> end-perform
>> perform timer-off goback
>> . timer-on.
>> perform read-the-time
>> move time-now to time-start
>> . timer-off.
>> perform read-the-time compute elapsed-time rounded = ((time-now -
>> time-start)
>> * 100000000 / repeat-factor) - timer-overhead
>>
>> if elapsed-time not greater than zero
>> move 'error' to elapsed-time-display
>> else compute elapsed-time-edited rounded = elapsed-time * 10
>> end-if
>> display test-name elapsed-time-display
>> . read-the-time.
>> accept time-now-hhmmsshh from time *> move function current-date to
>> current-date-structure
>> compute time-now =
>> ((((hours * 60) +
>> minutes) * 60) +
>> secs) +
>> hundredths .
> Here are the results I got:
>
> Null test 0
> Index 24
> Subscript 20
> Subscript comp-5 20
> Index 1 24
> Subscript 1 20
> Subscript 1 comp-5 20
>
> Jeff
>
> ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
> News==----
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
> Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption =----


From: Robert on
On Tue, 25 Sep 2007 00:40:25 -0600, Jeff Campbell <n8wxs(a)arrl.net> wrote:


>Here are the results I got:
>
>Null test 0
>Index 24
>Subscript 20
>Subscript comp-5 20
>Index 1 24
>Subscript 1 20
>Subscript 1 comp-5 20

Which CPU?
From: Jeff Campbell on
William M. Klein wrote:
> Jeff,
> Where did you run your test (O/S, machine, and COBOL compiler)?
>
Same as speed the speed1 results I posted earlier:

Machine is 600 MHz Alpha Personal Workstation running
OpenVMS 7.3-1, COBOL compiler is HP COBOL for OpenVMS version 2.8-1286.

Jeff

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
From: Jeff Campbell on
Robert wrote:
> On Tue, 25 Sep 2007 00:40:25 -0600, Jeff Campbell <n8wxs(a)arrl.net> wrote:
>
>
>> Here are the results I got:
>>
>> Null test 0
>> Index 24
>> Subscript 20
>> Subscript comp-5 20
>> Index 1 24
>> Subscript 1 20
>> Subscript 1 comp-5 20
>
> Which CPU?

Same as before with speed1, an Alpha Personal Workstation 600au
running OpenVMS 7.3-1.

Jeff

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----