> From: Gregory Woodhouse
> 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
Allegro Common Lisp on a 1.6GHz G5 PowerMac. For fun I
ran both an interpreted and a compiled version of the
function.
CL-USER(1):
(defun ack (m n)
(cond ((zerop m) (+ n 1))
((zerop n) (ack (- m 1) 1))
(t (ack (- m 1) (ack m (- n 1))))))
ACK
CL-USER(2): (time (ack 3 6))
; cpu time (non-gc) 3,170 msec user, 30 msec system
; cpu time (gc) 9,590 msec user, 60 msec system
; cpu time (total) 12,760 msec user, 90 msec system
; real time 18,816 msec
; space allocation:
; 5,425,087 cons cells, 221,868,840 other bytes,
18,888 static bytes
509
CL-USER(3): (compile 'ack)
ACK
NIL
NIL
CL-USER(4): (time (ack 3 6))
; cpu time (non-gc) 0 msec user, 0 msec system
; cpu time (gc) 0 msec user, 0 msec system
; cpu time (total) 0 msec user, 0 msec system
; real time 2 msec
; space allocation:
; 2 cons cells, 0 other bytes, 0 static bytes
509
CL-USER(5): (time (ack 3 9))
; cpu time (non-gc) 150 msec user, 0 msec system
; cpu time (gc) 0 msec user, 0 msec system
; cpu time (total) 150 msec user, 0 msec system
; real time 291 msec
; space allocation:
; 2 cons cells, 0 other bytes, 0 static bytes
4093
CL-USER(6):
Greg,
Have you seen AllegroCache? Persistent Lisp objects:
http://www.franz.com/products/allegrocache/index.lhtml
Also, regarding "The Structure and Interpretation of
Computer Programs".
I watched the first 3 or 4 video lectures:
http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
Fantastic stuff. I had moments of sheer astonishment.
Ken McKee
Duke University
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members