View previous topic :: View next topic |
Author |
Message |
powerhawk Beginner

Joined: 08 Nov 2004 Posts: 28 Topics: 4 Location: Stockholm
|
Posted: Fri Jan 13, 2006 4:21 am Post subject: Performance when converting uppercase to lowercase |
|
|
We have a frequently used function for translating uppercase to lowercase. The Cobol code we use is:
INSPECT TEST-DATA3CONVERTING 'ABCDEFGHIJKLMNOPQRSTUVWXY |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Jan 13, 2006 5:25 am Post subject: |
|
|
powerhawk,
Add the following statement before the ID division
The above parameter will produce a listing of the assembler-language expansion of your source code. Now take a look at the compiler listing after successful compilation. The process which generates least instructions will be the optimal one
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
haatvedt Beginner
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
|
Posted: Sun Jan 15, 2006 2:26 am Post subject: |
|
|
Powerhawk, I have used the same technique that you used after testing. Notice that if you use literal strings in you INSPECT statement it will generate inline code. If you use variable names then it will generate a call to a library routine. Even though the call to the library routine generates less ASSEMBLER code it is not as efficient as the inline code.
Try it and see... I did and that's what I found.
Chuck Haatvedt _________________ Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters) |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Sun Jan 15, 2006 3:38 am Post subject: |
|
|
You can use the intrinsic function "LOWER-CASE".
O.
________
HELP IN LOVE |
|
Back to top |
|
 |
|
|