[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simpe Gwydion question
Bruce Hoult (bruce@hoult.org) wrote:
: In article <bruce-103AB8.11061913072002@copper.ipg.tsnz.net>,
: Bruce Hoult <bruce@hoult.org> wrote:
: I've got some good news for you. I've just checked some modifications
: into cvs for the compiler which implement unboxed vectors of doubles.
: It took five lines of code :-)
: With one simple change your program now runs in 0.02 seconds instead of
: 1.23 seconds. After increasing the number of iterations from 100 to
: 10,000 it takes 0.76 seconds. So Dylan just got 160 times faster for
: this type of program.
<snip>
: I suspect this now beats CMUCL :-) You're welcome.
: The change is this:
: define constant <my-double-vector>
: = limited(<simple-vector>, of: <double-float>);
: If you declare it as a limited version of <vector> then the compiler
: doesn't know whether vector-foo() is going to receive a fixed size or
: stretchy vector and so you get non-optimal code. So we make sure it
: knows that it's going to get a fixed-size vector...
: -- Bruce
Good work, I fetched new version from CVS and I will try it.
Thanks
--
Waldek Hebisch
hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl