SV: Benchmarking different algorithms (was Beginning/End of week)
Jari.Kaljunen@teliasonera.com
Jari.Kaljunen@teliasonera.com
Wed, 10 Nov 2004 17:08:38 +0100
And on OpenVms:
1:
define d_day_1st date = floor(regdat / 100)*100 + 1
versus
2:
define d_day_1st date = nconv(asc(regdat,8)[1:6] + "01")
the winner is 1 with 10,5 seconds with 100000 records, alt 2. took 13,9 seconds.
/Jari
-----Ursprungligt meddelande-----
Från: powerh-l-admin@lists.sowder.com [mailto:powerh-l-admin@lists.sowder.com]För Latimer, Richard
Skickat: den 10 november 2004 01:31
Till: David Morrison - Corporate; powerh-l@lists.sowder.com
Ämne: RE: Benchmarking different algorithms (was Beginning/End of week)
This has now got my curiosity going ...
I have just conducted two back to back tests as follows:
Test 1:
set report limit 100000
access flight_data
DEFINE d_days_1st num*6 &
= DAYS(FLOOR(dte_mov / 100)*100) + 1
set subfile name test1out keep
rep summary idy_mov dte_mov d_days_1st
Test 2:
set report limit 100000
access flight_data
DEFINE d_days_1st num*6 &
=days(nconvert(substring(cconvert(dte_mov,8),1,6) + "01"))
set subfile name test2out keep
rep summary idy_mov dte_mov d_days_1st
Both were compiled and run sequentially in batch mode, no other users were active at the time.
Test 1 - elapsed time 1 minute 57 seconds, 109 seconds processing unit time reported in log
Test 2 - elapsed time 2 minutes 36 seconds, 151 seconds processing unit time reported in log
Test done using 6.07E on AS/400 model 30S
Looks like a win for maths on the IBM ...
cheers
Richard
>
--
**********************************************************************
This electronic message together with any attachments is confidential. If
you receive it in error: (i) you must not use, disclose, copy or retain
it; (ii) please contact the sender immediately by reply email and then
delete the emails. Views expressed in this email may not be those of the
Airways Corporation of New Zealand Limited
**********************************************************************