Greg Woodhouse wrote:
WARNING!! If you try to compute ACK(4,4) (or above), you'll wait a
*VERY* long time.The current benchmark being discussed on the Haskell list is the
Ackerman test. The benchmark itself is to computer ACK(3,9), but the
consensus seemsx to be that Haskell will outperform gcc for ACK(3,10)
or higher. Do you want to try it out with MUMPS? Here is a Scheme
implementation(define (ack m n)
(cond ((zero? m) (+ n 1))
((zero? n) (ack (- m 1) 1))
(else (ack (- m 1) (ack m (- n 1))))))On my workstation (a Pentium 4 with 1 GB RAM running XP SP2), I get
> (time (ack 3 9))
cpu time: 6578 real time: 6578 gc time: 858
4093
>Now, here is my translation of the above code to MUMPS
ZZGREG ; ; 1/17/06 12:57pm
ACK(M,N) ;
I M=0 Q N+1
N R
I N=0 S R=M-1 Q $$ACK(R,1)
Q $$ACK(M-1,$$ACK(M,N-1))
N S
S S=$$ACK(M,N-1)
Q $$ACK(R,S)Anyone want to give it a whirl?
===
Gregory Woodhouse <[EMAIL PROTECTED]>
"All truth passes through three stages: First, it is ridiculed.
Second, it is violently opposed. Third, it is accepted as
being self-evident."
--Arthur Schopenhauer-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members