A portion of my code, used many times, has the following segment:

polyhedron(

points = [

[cos(as)*Rroot, sin(as)*Rroot, z], //0

[cos(as)*Rtipp, sin(as)*Rtipp, z+z1], //1

[cos(as)*Rroot, sin(as)*Rroot, z+z2], //2

[cos(ae)*Rroot, sin(ae)*Rroot, z+zd], //3

[cos(ae)*Rtipp, sin(ae)*Rtipp, z+zd+z1], //4

[cos(ae)*Rroot, sin(ae)*Rroot, z+zd+z2]], //5

There a 2 values of sin and 2 of cos, each of which is used 3 times.

My question is for someone familiar with the OpenSCAD internals.

Does it calculate each of these 3 times? If so, is there a performance advantage to assigning them to variables, thus calculating them only once?

Larry