--- Steven McPhelan <[EMAIL PROTECTED]> wrote:

> How fair is this test to a M implementation that adheres to latest
> ANSI M?
> If I am not mistaken, the ANSI standard specifies the depth of the
> stack
> that any compliant implementation must adhere which I believe is 128.
>  So to
> compare one language adhering to its standards to another language
> which may
> not have any of the same restrictions would be unfair.
> --
> Steven McPhelan
> "Action springs not from thought, but from a readiness for
> responsibility."
> - Dietrich Bohhoeffer
> 


First of all, this is only one of many benchmarks in the shootout: thre
may well be others that tend to favor MUMPS. But, pehaps more to the
point, aa purely recursive solution is unlikely to be practical,
anyway. There is no reason an enterprising MUMPS programmer can't write
a different implementation that will run faster under MUMPS (but it
must implement the function defined by this simple algorithm). Also,
note that the Scheme program was purely recursive, but that doesn't
mean it was executed that way. Are MUMPS implementations barred from
using optimizations like tail recursion removal?

If you're wondering what that is, well, a simple example would be
transforming

FACT(N)  ;
 Q $S(N'>0:1,1:N*$$FACT(N-1))

to

FACT(N)  ;
 N VAL
 S VAL=1
L  ;
 G:N'>0 E
 S VAL=N*VAL
 S N=N-1
 G:N>0 L
E  ;
 Q VAL

===
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

Reply via email to