[Prev][Next][Index][Thread]

Re: Dylan performance



On Wed, 10 Jan 2001 11:45:01 -0500 (EST), Rolf Wester <wester@ilt.fhg.de>
wrote:

> Hi,
> 
> I'm a Dylan newby and try to test Dylan's performance. I'm running FO
> Dylan on a 450 MHz Pentium II with 520 MB RAM.
> The small test program is listed below. The Dylan version takes about 50
> seconds on my machine. A c++ version of that program takes only 0.2
> seconds (cygwin g++), a Python version 25 seconds and ACL6.0 Lisp 9
> seconds (with all possible declarations; CMUCL is faster but only
> available for UNIX). Is there any means to make the dylan code faster?
> 
> Besides this I get compile time errors when trying:
>    let t1 = make(<array>, dimensions: #(nx , ny), fill: 0.0);

This is because you are using literal list syntax and trying to have
variables evaluated inside it. You don't expect '(nx, ny) to work in Lisp.
Instead do "list(nx, ny)".

> Any help and/or hint is appreciated.

(i) make sure you are compiling in "production mode" in the project
settings;

(ii) don't run it under the debugger if you are benchmarking;

(iii) turn on the "compiler optimization colouring" under the view menu.
This will show you all kinds of nice colours which you can look up in a key
in the documentation. Basically reds/magentas are bad, blues are good, and
greys/greens are very good.

(iv) to get better optimization in this case introduce a specialized
floating point array type:

	eg define constant <floats> = limited(<array>, of: <float>);

then use it:

	eg let t1 :: <floats> = make(<floats>, ... );

Now recompile and toggle the optimization colouring. Notice how everything
is now optimized better.

__Jason


References: