Hi,
Well, lets see...
If we create 4 functions:
* t41701 heavyusage, rdml
Code: Select all
Function Options(*DIRECT *HEAVYUSAGE)
Change Field(#STD_AMNT) To('#STD_NUM + 123')
Exchange Fields(#STD_AMNT)
Return
* t41702 non heavyusage, rdml
Code: Select all
Function Options(*DIRECT)
Change Field(#STD_AMNT) To('#STD_NUM + 123')
Exchange Fields(#STD_AMNT)
Return
* t41703 heavyusage, rdmlx
Code: Select all
Function Options(*DIRECT *HEAVYUSAGE)
#STD_AMNT := #STD_NUM + 123
Exchange Fields(#STD_AMNT)
Return
* t41704 non heavyusage, rdmlx
Code: Select all
Function Options(*DIRECT)
#STD_AMNT := #STD_NUM + 123
Exchange Fields(#STD_AMNT)
Return
and create a RDML function to call those 4 functions, measure the time and store it in a table:
Code: Select all
Function Options(*DIRECT)
Begin_Loop Using(#STD_QTY) To(4)
Use Builtin(NUMERIC_STRING) With_Args(#STD_QTY) To_Get(#STD_TEXTS)
Use Builtin(CONCAT) With_Args('T4170' #STD_TEXTS) To_Get(#FUNCTION)
Use Builtin(CONCAT) With_Args(#STD_TEXTS ' *START* ' *TIMEC) To_Get(#STD_TEXTL)
Insert Fields(#STD_TEXTL) To_File(LOGXX)
Begin_Loop To(100000)
Change Field(#STD_NUM) To(9999)
Exchange Fields(#STD_NUM)
Call Process(*DIRECT) Function(#FUNCTION)
End_Loop
Use Builtin(NUMERIC_STRING) With_Args(#STD_AMNT) To_Get(#STD_CODEL)
Use Builtin(CONCAT) With_Args(#STD_TEXTS ' *END* ' *TIMEC ' * ' #STD_CODEL) To_Get(#STD_TEXTL)
Insert Fields(#STD_TEXTL) To_File(LOGXX)
End_Loop
and a rdmlx function to test the same:
Code: Select all
Function Options(*DIRECT)
Begin_Loop Using(#STD_QTY) To(4)
#FUNCTION := 'T4170' + #STD_QTY.AsString
#STD_TEXTL := #STD_QTY.AsString + ' *START* ' + *TIMEC
Insert Fields(#STD_TEXTL) To_File(LOGXX)
#STD_AMNT := 0
Begin_Loop To(100000)
#STD_NUM := 9999
Exchange Fields(#STD_NUM)
Call Process(*DIRECT) Function(#FUNCTION)
End_Loop
#STD_TEXTL := #STD_QTY.AsString + ' *END* ' + *TIMEC + ' * ' + #STD_AMNT.AsString
Insert Fields(#STD_TEXTL) To_File(LOGXX)
End_Loop
the results IBM RDML (non rdmlx) function making the call:
Code: Select all
1 *START* 134246
1 *END* 134331 * 10122 0:45 RDML -> RDML HEAVYUSAGE
2 *START* 134331
2 *END* 134420 * 10122 0:51 RDML -> RDML
3 *START* 134420
3 *END* 134423 * 10122 0:03 RDML -> RDMLX HEAVYUSAGE
4 *START* 134423
4 *END* 134427 * 10122 0:04 RDML -> RDMLX
the results IBM RDMLX function making the call are:
Code: Select all
1 *START* 133730
1 *END* 133818 * 10122.00 0:48 RDMLX -> RDML HEAVYUSAGE
2 *START* 133818
2 *END* 133911 * 10122.00 0:53 RDMLX ->RDML
3 *START* 133911
3 *END* 133912 * 10122.00 0:01 RDMLX -> RDMLX HEAVYUSAGE
4 *START* 133912
4 *END* 133914 * 10122.00 0:02 RDMLX -> RDMLX
from this quick test.... conclusion here... calling with heavyusage is faster than not when calling multiple times the same thing,
but calling rdmlx to rdmlx makes no significant difference in speed and is already way faster than rdml.
Looks like HEAVYUSAGE still could have a very small impact if any when rdmlx involved, but I can't test right now with longer values/times to have a definitive answer... for a better test, make the functions called take longer time to process something, but this can give you a basis to perform a larger test.
* the same program runs in windows and produce similar results, but my windows notebook takes about 10 times longer than the IBM I am using... so make the loop longer or smaller depending on your machine.
kind regards,