Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!news.kei.com!travelers.mail.cornell.edu!cornell!tyan
From: tyan@cs.cornell.edu (Thomas Yan)
Subject: Re: AKCL vs Fortran vs ML time test
Message-ID: <1994Sep29.181724.1709@cs.cornell.edu>
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
References: <35qnpp$t41@coils.cims.nyu.edu>
Date: Thu, 29 Sep 1994 18:17:24 GMT
Lines: 39

In article <35qnpp$t41@coils.cims.nyu.edu> mconnell@coils.cims.nyu.edu (Mark McConnell) writes:
>I have been doing some timing tests to compare various languages, and
>I thought people would like to see the results.

>_Version 3_ is a translation of Version 2 into the relatively new
>functional language ML, as shown below.  I used Standard ML of New
>Jersey, a version from 1990 (I think).

the sml/nj compiler has been significantly improved since 1990.  the
1993 release (version 0.93) can be found via anonymous ftp at both
princeton.edu:pub/ml and research.att.com:dist/ml.  you can also find
an experimental version (version 1.05) at
research.att.com:dist/ml/working, which has a number of additional
improvements. [1]

note: although sml/nj tends to use a fair bit of memory, its memory
use should not be excessive for this example.

>Third, let me say that I don't know enough about ML to have given it a
>fair trial.  I hear there are things you can do to speed up compiled
>code involving lists (e.g., get the built-in list functions into the
>same compilation environment as the user functions).

since you're not calling built-in list functions (e.g. map), this does
not apply for your simple example.

- t

[1] there is also support for partially unrolling list
    representations, although this is turned off by the default.  the
    idea is instead of having list cells of the form (element,tail ptr),
    have list cells (element1,element2,ptr).  this should reduce
    fetches and allocation, especially if the compiler is able to
    unroll your list code to work on two elements at a time.
-- 
-------------------------------------------------------------------------
Thomas Yan                          email: tyan@cs.cornell.edu
Computer Science Department        office: (607) 255-5579
4141 Upson Hall                       Fax:       255-4428
