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: [email protected] 
[mailto:[email protected]] 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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to