[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simpe Gwydion question
In article <agmvo3$fq3$1@panorama.wcss.wroc.pl>,
hebisch@math.uni.wroc.pl (Waldek Hebisch) wrote:
> It takes 1.23s on 800 MHz Athlon.
OK, it's the same speed on my 700 MHz Athlon (d2c 2.3.9pre2). Let's
take a look...
dvec[i] := dvec[i] + 1.64;
Unfortunately, all three of the operations here are going through full
generic function dispatch. You've done everything right, but we could
do a bit more work on this part of d2c. We only got support for limited
vectors into the compiler at all a couple of versions ago and at the
moment it works, but is only optimized for some data types.
I'm afraid that the best you can do at the moment using portable Dylan
is to use a plain vector...
define constant <my-double-vector> = <simple-object-vector>;
... and then introduce a temporary variable...
let elem :: <double-float> = dvec[i];
dvec[i] := elem + 1.64;
This reduces the time to 0.507 seconds. Every double is still being
allocated on the heap, which isn't good.
-- Bruce