[plt-scheme] Fractals
Quoting Joshua Zucker <joshua.zucker at gmail.com>:
> Hi Matthew and all,
> I'm also using PLT Scheme for a project that involves lots of
> floating-point calculation, namely my attempts at
> http://recmath.org/contest.
>
> I'm still roughly in the top 10 on the contest despite running on just
> one CPU and using the relatively-slow PLT Scheme floating point for
> most of the arithmetic. I credit the fast
> development-test-explore-revise cycle for that. My code is quite
> short, quite simple, easy to improve -- not because I'm a good
> programmer, but just because of the support that HtDP and PLT give.
>
> But your recent email makes me wonder if I could get a significant
> speedup in my central loops by doing something special with my
> floating-point numbers ... it also makes me think that it's pretty
> hopeless. Should I write some of those innermost loops in C and then
> call them somehow? (Do you have a reference on how to do that?)
PLT provides two ways to interact with C. I think "PLT Foreign Interface Manual"
is the doc for you needs.
> I've done some profiling so I know exactly where my code spends most
> of its time (divided almost equally among the innermost loops of
> several floating point calculations).
>
> of course there are also ways (by rearranging my data structures, and
> using better computational geometry algorithms than the naive ones
> I've implemented so far, and so on) that I can get a speedup of a
> factor of a few by doing some more work programming in PLT Scheme.
>
> Thanks,
> --Joshua
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>