0
$\begingroup$

Is there a perfomance wise way to limit decimal numbers for all values inside NodeTree?

Sometimes I don't need that many decimal numbers, especially for comparing values to get desired boolean result. Limiting values like Vectors, Eulers is a waste of resources as they need to be separated to floats and recombined after. Any tips are welcome.

$\endgroup$

1 Answer 1

0
$\begingroup$

Non list types are represented using python objects, so you can't really change the precision.

Vectors types lists in Animation Nodes (i.e. Vector3DList, Vector2DList, EulerList,...) are composed of float typed numbers, which is the smallest possible type, so you can't have smaller precision than that.

A float list in Animation Nodes is actually composed of doubles, so you can reduce the precision by using a FloatList instead.

An integer type in Animation Nodes is a long, so you can reduce the precision by using a ShortList, a CharList, or an IntegerList. Though I believe two of them might have the same precision on some systems/compilers.

Finally, I think it is unlikely to get a performance boost out of this, at least in the context of AN. So I think you are better off optimizing your node tree somewhere else.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .