|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 5/7/20 9:45 PM, William F Pokorny wrote:
> ...
> > In a surprise, I expected f_agate() to be a little slower than the
> > inbuilt used as a pattern in a pigment, for example. It's running about
> > 16% faster for reasons not currently understood. This the first pattern
> > where - other than f_dents which is cheap - the inbuilt function
> > implementation can match the pattern one exactly. (My f_granite23
> > inbuilt doesn't match granite.) A mystery for another day.
> ...
>
> A significant part of the performance degrade in the normal agate
> pattern looks to be due the use of a dynamic_cast(1) while it checks
> which turbulence warp exists / is the internal agate one. So, other
> special turbulence patterns likely have this slow down too - though I've
> not tested them.
You mean this train wreck of a C++ function that is abusing dynamic cast for a
type check?
bool AgatePattern::Precompute()
{
return (!warps.empty() && dynamic_cast<ClassicTurbulence*>(*warps.begin()));
}
Oh hell, if the remaining code was turned into such a pile of junk :-( :-( :-(
Post a reply to this message
|
|