/* Calendar program: This algorithm was published in comp.programming and comes from Andy Lowry, lowry@watson.ibm.com, (914) 784-7925 IBM Research, P.O. Box 704, Yorktown Heights, NY 10598 % Original Prolog version by Peter Ludemann, % optimized for BinProlog by Paul Tarau. */ % Last 10000 FoolsDays arithmetic benchmark: :- main. q:- go(10000), halt_or_else(0,true). go(N):- day_of_week(1993,4,9,Day), statistics, write('April 9, 1993 is: '), write(Day), nl, statistics(runtime,_), empty_loop(N), statistics(runtime,[_,T1]), full_loop(N), statistics(runtime,[_,T2]), T is T2-T1, write([fools_days=N,time=T]), nl. range(Min,Min,Max):- Min= 8650 SbProlog 3.1 -----------------> 1820 /1.2 1516 C-emulated Sicstus 2.1 -------> 1440 1200 Sicstus 0.6 (compile) --------> 730 BinProlog 1.71 ---------------> 800 666 Quintus 3.1.1 ---------------> 584 486 wamcc ------------------------> 300 Native Sicstus 2.1 -----------> 350 291 ------------------------------------------------------------------- */