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

Re: Dylan performance



Hi,

thanks to all for your replys. Unfortunately the program didn't become faster (actually used code below).

I switched to "Production mode", made a "Prodcution Release" and ran the release executable by double
clicking on it. I still takes 50 seconds. This is the slowest one of all I have tested, even unoptimized
Lisp
is faster.

--Rolf

--------------------------------------------------------------------------------------------------------


let t1 = make(limited(<array>, of: <float>), dimensions: #(300, 300), fill: 0.0);
let t2 = make(limited(<array>, of: <float>), dimensions: #(300, 300), fill: 0.0);

//with the above two declarations within the method body I get a "stack overflow error".

define method temp (nx :: <integer>, ny :: <integer>, nt :: <integer>)

   for (k from 0 to nt - 1)
     for (i from 1 to nx - 2)
       for (j from 1 to ny - 2)
           t2[i, j] := t1[i, j] + 1.0 + 0.1 *
                                              (t1[i + 1, j] +
                                               t1[i - 1, j] +
                                               t1[i, j + 1] +
                                               t1[i, j - 1] -
                                         4.0 * t1[i,j]);
        end for;
     end for;
     for (i from 1 to nx - 2)
       for (j from 1 to ny - 2)
           t1[i, j] := t2[i, j] + 1.0 + 0.1 *
                                              (t2[i + 1, j] +
                                               t2[i - 1, j] +
                                               t2[i, j + 1] +
                                               t2[i, j - 1] -
                                         4.0 * t2[i,j]);
        end for;
     end for;
     format-out("%= \n", aref(t1, 150, 150));
   end for;
end method;

temp(300  , 300 , 10);






Follow-Ups: References: