|
|
Algo <Gem### [at] hotmailcom> wrote:
> No I didn't claim that it is faster than the exponent=2 special code. I haven't
> measured that. I have measured vs. the mandelx with exponent = 2 and it turned
> out to be a few x faster there.
> If speed is the only consideration, then one picks the fastest choice,
> obviously. I will measure the new code vs. the exponent=2 special code.
> If there is a threshhold for trading off some amount of speed in exchange for
> some amount of code reduction, then it's parameters. Better judged by experts
> like yourself who know the values of such trade-offs.
> I'm an enthusiastic code pruner, myself.
As you may have noticed, the current source has specializations for
the exponents 2, 3 and 4, and the larger exponents are calculated with
the generalized function. Your improvement would basically replace the
latter.
It may be good to measure the speed of your generic function to the
speed of the specialized exponent 4 function to see which is faster
(my guess is that the specialized one is, but I can't know without
actually measuring). If the specialized function results to be slower,
then it may be removed as well.
--
- Warp
Post a reply to this message
|
|