|
It is hard for me to imagine an iseries takes more than two mins to do
this operation 5012 times. I wrote a test program and ran it under the
worst case senario (where s has a value of 'a'). Execute this operation
5012 times only took 2 secs on our test system. Can you try this?
D s s 18462 inz('a')
D sLen s 5i 0
D ix s 5i 0
D msg s 52
/free
msg = 'Start at ' + %char(%timestamp);
dsply msg;
for ix = 1 to 5012;
sLen = %len(%trimr(s));
endfor;
msg = 'Ended at ' + %char(%timestamp);
dsply msg;
*inlr = *on;
/end-free
"James H. H. Lampert" <jamesl@xxxxxxxxxxxxxxxxx> wrote in message
news:mailman.10896.1267054104.2580.rpg400-l@xxxxxxxxxxxxxxx
Albert York wrote:
In my tests, CHECKR performed at least 30% better than %len(%trimr(s))
Definitely something to keep in mind, for cases where I can't simply
calculate the value, based on the lengths of what went into the field.
At any rate, calculating the value, rather than calling %LEN(%TRIMR())
cut processing time per record by about 31 milliseconds out of a total of
about 55 milliseconds. Or in more concrete terms, the time to process and
deliver 5012 records dropped from over 4 1/2 minutes to about 2, running
on a 170.
Thanks to all who had anything to say.
--
JHHL
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.