From: Josh Gardner
Subject: Complex number calculation speedup?
Date: 
Message-ID: <3625627F.AF06F62F@dowco.com>
Hello all,

I am writing a program (nope, not homework) that does iterative
calculations with complex numbers... actually, in its final form it will
use genetic programming and genetic algorithm techniques to alter, sort
of "breed" formulas. As it happens, the formulas are for fractals.

Right now, the calculations are relatively slow. Certainly part of this
is due to the way I am plotting the points (but that's too complex for
right now, I'm just interested in some ideas) - but what I am really
wondering is: would I be able to gain any appreciable performance
speedup by explicitly declaring the variable types as constants?

Thanks for the input!
From: Barry Margolin
Subject: Re: Complex number calculation speedup?
Date: 
Message-ID: <iNeV1.36$eJ2.607768@burlma1-snr1.gtei.net>
In article <·················@dowco.com>,
Josh Gardner  <·····@dowco.com> wrote:
>Right now, the calculations are relatively slow. Certainly part of this
>is due to the way I am plotting the points (but that's too complex for
>right now, I'm just interested in some ideas) - but what I am really
>wondering is: would I be able to gain any appreciable performance
>speedup by explicitly declaring the variable types as constants?

Quite possibly.  Complex numbers often need to be boxed and unboxed as
they're passed around.  If you put in declarations, the compiler may be
able to optimize this by open-coding the math functions.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.