Why couldn't you say
LEAP.YEAR = NOT(MOD(YEAR,4)) AND (NOT(MOD(YEAR,400)) OR MOD(YEAR,100)) Would the system process the whole line even on an initial finding of False ? -----Original Message----- From: andy baum <andyb...@yahoo.co.uk> To: U2 Users List <u2-users@listserver.u2ug.org> Sent: Wed, Dec 7, 2011 7:25 pm Subject: Re: [U2] End of Month date routine Seem to have lost a bit of last reply which should have read Ran Dan's test code on latest Windows PE version of Universe and got :- 9.788 1.558 1.474 3.412 Tried NOT(MOD(YEAR,400)) OR(NOT(MOD(YEAR,4)) AND MOD(YEAR,100))) which took 2.181 seconds but the fastest I could get was LEAP.YEAR = NOT(MOD(YEAR,4)) IF LEAP.YEAR THEN LEAP.YEAR = (NOT(MOD(YEAR,400)) OR MOD(YEAR,100)) END which took 1.423 seconds Got the same trend, although different timings on our Solaris 10 box running Universe 10.3.6 Cheers, Andy ________________________________ From: Daniel McGrath <dmcgr...@rocketsoftware.com> To: "dgr...@dagconsulting.com" <dgr...@dagconsulting.com>; U2 Users List <u2-users@listserver.u2ug.org> Sent: Wednesday, 7 December 2011, 18:57 Subject: Re: [U2] End of Month date routine I added the code to PasteBin so as to not flood here: http://pastebin.com/JMyqhFud I did a few more than 100K and I cut the OCONV step out from all of them. I took the liberty to adjust Will's version to return correct results. The results I got, in order, was: 16.872 2.804 2.384 5.561 So, if you have a need to account for your milliseconds, the slightly optimized Wikipedia algorithm seems to be the fastest. Interested to see if there are any better? (Or if I made any mistakes...) Regards, Dan -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green Sent: Wednesday, December 07, 2011 10:48 AM To: 'U2 Users List' Subject: Re: [U2] End of Month date routine Who wants to take each of the Leap Year calculations and put them into different subroutines and loop 100K times and see which one is faster using profiling? David A. Green (480) 813-1725 DAG Consulting _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users