🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.tsorexx
20 messages
20 total messages Started by Phil Smith III Thu, 28 Feb 2013 13:09
Re: Tuning Question
#207
Author: Phil Smith III
Date: Thu, 28 Feb 2013 13:09
55 lines
2195 bytes
Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#208
Author: Adrian Stern
Date: Thu, 28 Feb 2013 14:07
80 lines
2956 bytes
God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
	X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
	X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#209
Author: Bodoh John Robert [Contractor]
Date: Thu, 28 Feb 2013 14:23
94 lines
3742 bytes
Before you spoon-feed, make sure that what you are feeding is palatable.  The title is tuning.  So why the multiple POS function calls and why the extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
	X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
	X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#210
Author: Adrian Stern
Date: Thu, 28 Feb 2013 14:32
127 lines
4611 bytes
Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
	X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
	X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#212
Author: Mickey
Date: Mon, 04 Mar 2013 01:43
142 lines
5580 bytes
Here I disagree. Do i = 1 to x is more efficient than keeping a counter and
incrementing it for each iteration. Most of my core processing do loops have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
SV: [TSO-REXX] Tuning Question
#213
Author: Thomas Berg
Date: Mon, 04 Mar 2013 08:52
173 lines
6798 bytes
AFAIK there is a special optimization of the code if the "looping" variable is only once char.
E g this loop I optimized:

Do  i = 1 To input.0
     ...
End

But this is not:

Do  ii = 1 To input.0
    ...
End



Regards
Thomas Berg
____________________________________________________________________
Thomas Berg   Specialist   z/OS\RQM\IT Delivery   SWEDBANK AB (Publ)


> -----Ursprungligt meddelande-----
> Fr�n: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] F�r
> Mickey
> Skickat: den 4 mars 2013 02:43
> Till: TSO-REXX@VM.MARIST.EDU
> �mne: Re: [TSO-REXX] Tuning Question
> 
> Here I disagree. Do i = 1 to x is more efficient than keeping a counter
> and incrementing it for each iteration. Most of my core processing do
> loops have something like an I = 1 to input.0, and then I can do all my
> processing by accessing the current row as input.i.
> 
> -----Original Message-----
> From: Adrian Stern
> Sent: Thursday, February 28, 2013 9:32 AM
> To: TSO-REXX@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] Tuning Question
> 
> Dear oh dear!
> 
> I was just sketching an example of how one can save resources by not
> repeating function call. There is no "extra" do-end pair - it's an
> example - just a sketch of what I've seen and how to "tune it up" a
> bit.
> 
> Just like if you know a loop is to execute 10 times then Do 10
> 
> End
> Is more efficient than
> Do I = 1 to 10
> End
> Or even
> Do forever
> X=x+1
> If x<10 then leave
> End
> 
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On
> Behalf Of Bodoh John Robert [Contractor]
> Sent: den 28 februari 2013 15:22
> To: TSO-REXX@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] Tuning Question
> 
> Before you spoon-feed, make sure that what you are feeding is
> palatable.
> The title is tuning.  So why the multiple POS function calls and why
> the extra DO - END.
> 
> John
> 
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On
> Behalf Of Adrian Stern
> Sent: Thursday, February 28, 2013 9:07 AM
> To: TSO-REXX@vm.marist.edu
> Subject: Re: [TSO-REXX] Tuning Question
> 
> God you need spoonfeeding
> If pos(needle,haystack) > 0
> Then
> Do
> X=substr(anystring, pos(needle,haystack)) End Compared with iPos =
> pos(needle,haystack)
> 
> if iPos > 0
> then
> Do
> X=substr(anystring,iPos)
> End
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On
> Behalf Of Phil Smith III
> Sent: den 28 februari 2013 14:09
> To: TSO-REXX@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] Tuning Question
> 
> Adrian Stern wrote:
> >Obviouosly not. But for example you may write:
> 
> >If pos() then
> >Do
> >       X=substr(pos())
> >End
> 
> >Whereas:
> 
> >iPos=pos()
> >if iPos then
> >Do
> >       X=substr(iPos)
> >End
> >Uses fewer resources
> 
> Hm? This makes no sense: the first format won't work unless POS (which
> I'm assuming isn't the POS BIF) only ever returns 0 or 1.
> 
> If instead you meant something like:
>    s = 'asdfsafdsaf'
>    if pos() <> 0 then
>    Do
>       X=substr(s, pos())
>    End
>    exit
> POS:
>    return 3
> 
> vs
> 
>    s = 'asdfsafdsaf'
>    iPos=pos()
> 
>    if iPos <> 0 then
>    Do
>       X=substr(s,iPos)
>    End
>    exit
> 
> POS:
>    return 3
> 
> Then the answer is "No kidding, you're calling the POS function once
> instead of twice". Literal-ness has nothing to do with it: in fact, if
> you replace the second operand on the SUBSTR with a literal (thus
> removing the second POS call in the first case, and the variable
> substitution in the second), the first example is more efficient.
> 
> What am I missing here?
> 
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions, send
> email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
> 
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions, send
> email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
> 
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions, send
> email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
> 
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions, send
> email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
> 
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions, send
> email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#214
Author: Adrian Stern
Date: Mon, 04 Mar 2013 09:18
158 lines
6241 bytes
I fear you may not actually understand what I write and I can't think of any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter and
incrementing it for each iteration. Most of my core processing do loops have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#216
Author: Ken MacKenzie
Date: Mon, 04 Mar 2013 11:43
190 lines
7067 bytes
Hi Adrian,

Maybe you do it deliberately to provoke reaction but you remind me of the
guy driving the wrong way on the motorway (freeway, autoroute, autobahn,
autostrada, autopista, otoyol, snelweg, expressway, thruway) complaining
about all the other idiots who are getting it wrong.




From:   Adrian Stern <adriangstern@GMAIL.COM>
To:     TSO-REXX@VM.MARIST.EDU,
Date:   04/03/2013 09:18
Subject:        Re: [TSO-REXX] Tuning Question
Sent by:        TSO REXX Discussion List <TSO-REXX@VM.MARIST.EDU>



I fear you may not actually understand what I write and I can't think of
any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter
and
incrementing it for each iteration. Most of my core processing do loops
have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example
-
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf
Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once
instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#218
Author: Adrian Stern
Date: Mon, 04 Mar 2013 12:34
204 lines
7686 bytes
I cannot understand why a sketched example should be so hard to understand!
Maybe you're all Americans! (That was provocative!)

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Ken MacKenzie
Sent: den 4 mars 2013 12:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Hi Adrian,

Maybe you do it deliberately to provoke reaction but you remind me of the
guy driving the wrong way on the motorway (freeway, autoroute, autobahn,
autostrada, autopista, otoyol, snelweg, expressway, thruway) complaining
about all the other idiots who are getting it wrong.




From:   Adrian Stern <adriangstern@GMAIL.COM>
To:     TSO-REXX@VM.MARIST.EDU,
Date:   04/03/2013 09:18
Subject:        Re: [TSO-REXX] Tuning Question
Sent by:        TSO REXX Discussion List <TSO-REXX@VM.MARIST.EDU>



I fear you may not actually understand what I write and I can't think of
any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter
and
incrementing it for each iteration. Most of my core processing do loops
have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example
-
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf
Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once
instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#220
Author: Mickey
Date: Mon, 04 Mar 2013 13:16
173 lines
7008 bytes
Why is it that in this day of perpetual communication, some people cannot
engage in civil discourse, and must resort to being complete assholes? Want
an example? Try the nearest mirror. Fortunately, I can block your email, and
need not see any more of your idiocy on my PC.

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 4:17 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

I fear you may not actually understand what I write and I can't think of any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter and
incrementing it for each iteration. Most of my core processing do loops have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#221
Author: Mickey
Date: Mon, 04 Mar 2013 13:17
204 lines
7615 bytes
He reminds me of a common UseNet troll

Mickey

-----Original Message-----
From: Ken MacKenzie
Sent: Monday, March 04, 2013 6:43 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Hi Adrian,

Maybe you do it deliberately to provoke reaction but you remind me of the
guy driving the wrong way on the motorway (freeway, autoroute, autobahn,
autostrada, autopista, otoyol, snelweg, expressway, thruway) complaining
about all the other idiots who are getting it wrong.




From:   Adrian Stern <adriangstern@GMAIL.COM>
To:     TSO-REXX@VM.MARIST.EDU,
Date:   04/03/2013 09:18
Subject:        Re: [TSO-REXX] Tuning Question
Sent by:        TSO REXX Discussion List <TSO-REXX@VM.MARIST.EDU>



I fear you may not actually understand what I write and I can't think of
any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter
and
incrementing it for each iteration. Most of my core processing do loops
have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example
-
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf
Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once
instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#222
Author: Mickey
Date: Mon, 04 Mar 2013 13:18
221 lines
8558 bytes
Actually, I am an Israeli by birth, and an American by the grace of God. You
are just a rude, arrogant individual. Frankly, I would bet my life and the
lives of all those I know that I have written 20 lines of production Rexx
code for every line you have, and frankly, the day I need lessons from a
stuffed shirt will be the day I hang up my keyboard and mouse and take up
gardening turnips for a living.

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 7:33 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

I cannot understand why a sketched example should be so hard to understand!
Maybe you're all Americans! (That was provocative!)

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Ken MacKenzie
Sent: den 4 mars 2013 12:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Hi Adrian,

Maybe you do it deliberately to provoke reaction but you remind me of the
guy driving the wrong way on the motorway (freeway, autoroute, autobahn,
autostrada, autopista, otoyol, snelweg, expressway, thruway) complaining
about all the other idiots who are getting it wrong.




From:   Adrian Stern <adriangstern@GMAIL.COM>
To:     TSO-REXX@VM.MARIST.EDU,
Date:   04/03/2013 09:18
Subject:        Re: [TSO-REXX] Tuning Question
Sent by:        TSO REXX Discussion List <TSO-REXX@VM.MARIST.EDU>



I fear you may not actually understand what I write and I can't think of
any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter
and
incrementing it for each iteration. Most of my core processing do loops
have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example
-
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf
Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once
instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#223
Author: Adrian Stern
Date: Mon, 04 Mar 2013 13:31
186 lines
7469 bytes
If you choose not to learn that's entirely up to you

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 14:15
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Why is it that in this day of perpetual communication, some people cannot
engage in civil discourse, and must resort to being complete assholes? Want
an example? Try the nearest mirror. Fortunately, I can block your email, and
need not see any more of your idiocy on my PC.

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 4:17 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

I fear you may not actually understand what I write and I can't think of any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter and
incrementing it for each iteration. Most of my core processing do loops have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#224
Author: Adrian Stern
Date: Mon, 04 Mar 2013 13:32
217 lines
8051 bytes
That's plain abuse Mr Mouse

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 14:16
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

He reminds me of a common UseNet troll

Mickey

-----Original Message-----
From: Ken MacKenzie
Sent: Monday, March 04, 2013 6:43 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Hi Adrian,

Maybe you do it deliberately to provoke reaction but you remind me of the
guy driving the wrong way on the motorway (freeway, autoroute, autobahn,
autostrada, autopista, otoyol, snelweg, expressway, thruway) complaining
about all the other idiots who are getting it wrong.




From:   Adrian Stern <adriangstern@GMAIL.COM>
To:     TSO-REXX@VM.MARIST.EDU,
Date:   04/03/2013 09:18
Subject:        Re: [TSO-REXX] Tuning Question
Sent by:        TSO REXX Discussion List <TSO-REXX@VM.MARIST.EDU>



I fear you may not actually understand what I write and I can't think of
any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter
and
incrementing it for each iteration. Most of my core processing do loops
have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example
-
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf
Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf
Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once
instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#225
Author: Mickey
Date: Mon, 04 Mar 2013 13:42
198 lines
8019 bytes
Learn? From YOU? Now that is the best joke I have heard in YEARS !!!

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 8:30 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

If you choose not to learn that's entirely up to you

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 14:15
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Why is it that in this day of perpetual communication, some people cannot
engage in civil discourse, and must resort to being complete assholes? Want
an example? Try the nearest mirror. Fortunately, I can block your email, and
need not see any more of your idiocy on my PC.

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 4:17 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

I fear you may not actually understand what I write and I can't think of any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter and
incrementing it for each iteration. Most of my core processing do loops have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: Tuning Question
#226
Author: Adrian Stern
Date: Mon, 04 Mar 2013 13:47
211 lines
8450 bytes
Glad to amuse

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 14:42
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Learn? From YOU? Now that is the best joke I have heard in YEARS !!!

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 8:30 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

If you choose not to learn that's entirely up to you

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 14:15
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Why is it that in this day of perpetual communication, some people cannot
engage in civil discourse, and must resort to being complete assholes? Want
an example? Try the nearest mirror. Fortunately, I can block your email, and
need not see any more of your idiocy on my PC.

-----Original Message-----
From: Adrian Stern
Sent: Monday, March 04, 2013 4:17 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

I fear you may not actually understand what I write and I can't think of any
other way of putting it - those were examples of inefficiency, compared to
the good example of Do 10!
Would you like me to try another language?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Mickey
Sent: den 4 mars 2013 02:43
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Here I disagree. Do i = 1 to x is more efficient than keeping a counter and
incrementing it for each iteration. Most of my core processing do loops have
something like an I = 1 to input.0, and then I can do all my processing by
accessing the current row as input.i.

-----Original Message-----
From: Adrian Stern
Sent: Thursday, February 28, 2013 9:32 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Dear oh dear!

I was just sketching an example of how one can save resources by not
repeating function call. There is no "extra" do-end pair - it's an example -
just a sketch of what I've seen and how to "tune it up" a bit.

Just like if you know a loop is to execute 10 times then
Do 10

End
Is more efficient than
Do I = 1 to 10
End
Or even
Do forever
X=x+1
If x<10 then leave
End

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Bodoh John Robert [Contractor]
Sent: den 28 februari 2013 15:22
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Before you spoon-feed, make sure that what you are feeding is palatable.
The title is tuning.  So why the multiple POS function calls and why the
extra DO - END.

John

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of
Adrian Stern
Sent: Thursday, February 28, 2013 9:07 AM
To: TSO-REXX@vm.marist.edu
Subject: Re: [TSO-REXX] Tuning Question

God you need spoonfeeding
If pos(needle,haystack) > 0
Then
Do
X=substr(anystring, pos(needle,haystack))
End
Compared with
iPos = pos(needle,haystack)

if iPos > 0
then
Do
X=substr(anystring,iPos)
End
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Phil Smith III
Sent: den 28 februari 2013 14:09
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Tuning Question

Adrian Stern wrote:
>Obviouosly not. But for example you may write:

>If pos() then
>Do
>       X=substr(pos())
>End

>Whereas:

>iPos=pos()
>if iPos then
>Do
>       X=substr(iPos)
>End
>Uses fewer resources

Hm? This makes no sense: the first format won't work unless POS (which I'm
assuming isn't the POS BIF) only ever returns 0 or 1.

If instead you meant something like:
   s = 'asdfsafdsaf'
   if pos() <> 0 then
   Do
      X=substr(s, pos())
   End
   exit
POS:
   return 3

vs

   s = 'asdfsafdsaf'
   iPos=pos()

   if iPos <> 0 then
   Do
      X=substr(s,iPos)
   End
   exit

POS:
   return 3

Then the answer is "No kidding, you're calling the POS function once instead
of twice". Literal-ness has nothing to do with it: in fact, if you replace
the second operand on the SUBSTR with a literal (thus removing the second
POS call in the first case, and the variable substitution in the second),
the first example is more efficient.

What am I missing here?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
#229
Author: Paul Gilmartin
Date: Mon, 04 Mar 2013 15:20
30 lines
2432 bytes
On Mar 4, 2013, at 01:52, Thomas Berg wrote:

> AFAIK there is a special optimization of the code   ...
>
Also note that any reference to a standard function such as:

    X = length( A )

causes the interpreter to scan to the end of the entire program
searching for a possible user-defined function with the same
name, which may be considerable overhead, whereas quoting the
function name, as in:

    X = 'LENGTH'( A )

searches only for the standard (or possibly external) function.

But beware!  In CMS Rexx, the quoted function name is treated as
case-sensitive; in TSO Rexx, case-insensitive.

Conversely, this behavior is useful in that a call to any
function results in the interpreter's immediately detecting
syntax errors in instructions that otherwise might not be
scanned until much later.

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
SV: [TSO-REXX] SV: [TSO-REXX] Tuning Question
#231
Author: Thomas Berg
Date: Mon, 04 Mar 2013 15:31
50 lines
3406 bytes
> -----Ursprungligt meddelande-----
> Fr�n: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] F�r Paul
> Gilmartin
> Skickat: den 4 mars 2013 16:20
> Till: TSO-REXX@VM.MARIST.EDU
> �mne: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question
> 
> On Mar 4, 2013, at 01:52, Thomas Berg wrote:
> 
> > AFAIK there is a special optimization of the code   ...
> >
> Also note that any reference to a standard function such as:
> 
>     X = length( A )
> 
> causes the interpreter to scan to the end of the entire program
> searching for a possible user-defined function with the same name,
> which may be considerable overhead, whereas quoting the function name,
> as in:
> 
>     X = 'LENGTH'( A )
> 
> searches only for the standard (or possibly external) function.

But I would presume that this is only relevant for the first call to the function ? 
As it seems that the natural thing for rexx to do is to save the pointer/whatever to the function for further calls to the same routine.  

> But beware!  In CMS Rexx, the quoted function name is treated as case-
> sensitive; in TSO Rexx, case-insensitive.
> 
> Conversely, this behavior is useful in that a call to any function
> results in the interpreter's immediately detecting syntax errors in
> instructions that otherwise might not be scanned until much later.

Can You give an example so I can understand what you are thinking about ?




Regards
Thomas Berg
____________________________________________________________________
Thomas Berg   Specialist   z/OS\RQM\IT Delivery   SWEDBANK AB (Publ)


 

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
#232
Author: Vitonis, Tony
Date: Mon, 04 Mar 2013 15:55
21 lines
2275 bytes
I wonder how often this is a bottleneck in code performance.
 
-----Original Message-----
From: Paul Gilmartin
Sent: Monday, March 04, 2013 10:20 AM
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: SV: [TSO-REXX] Tuning Question

Also note that any reference to a standard function such as:

    X = length( A )

causes the interpreter to scan to the end of the entire program searching for a possible user-defined function with the same name, which may be considerable overhead, whereas quoting the function name, as in:

    X = 'LENGTH'( A )

searches only for the standard (or possibly external) function.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
#233
Author: Adrian Stern
Date: Mon, 04 Mar 2013 16:42
46 lines
3270 bytes
Hmmm - does this really matter Paul? I don't know how many times the code is
scanned but it wouldn't be scanned more than once would it? Surely a first
scan would map internal and external calls for future reference? Does anyone
actually know how this works?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of
Paul Gilmartin
Sent: den 4 mars 2013 16:20
To: TSO-REXX@VM.MARIST.EDU
Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question

On Mar 4, 2013, at 01:52, Thomas Berg wrote:

> AFAIK there is a special optimization of the code   ...
>
Also note that any reference to a standard function such as:

    X = length( A )

causes the interpreter to scan to the end of the entire program
searching for a possible user-defined function with the same
name, which may be considerable overhead, whereas quoting the
function name, as in:

    X = 'LENGTH'( A )

searches only for the standard (or possibly external) function.

But beware!  In CMS Rexx, the quoted function name is treated as
case-sensitive; in TSO Rexx, case-insensitive.

Conversely, this behavior is useful in that a call to any
function results in the interpreter's immediately detecting
syntax errors in instructions that otherwise might not be
scanned until much later.

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads