In a language like C, I believe it would be faster to do it without cmath (complex math) because there are tricks to use intermediate calculations twice (basically, two computations versus 4 internal computations with cmath). I don't believe it would be much faster in TI-BASIC, but here is the general idea:

If z=x+iy, then z^{2}=(x+iy)^{2}=x^{2}+2ixy+(iy)^{2}=x^{2}-y^{2}+2ixy

So the new real part is x^{2}-y^{2} and the new imaginary part is 2xy. Part of the iteration process for the mset is to test if |z|<2. |z|=sqrt(x^{2}+y^{2}). However, squaring both sides, we can just check if 4>|z|^{2}=x^{2}+y^{2}. So the iteration would be:

```
X→V
Y→W
V²→A
W²→B
10→I
While I and A+B<4
2WV+Y→W
A-B+X→V
V²→A
W²→B
I-1→I
End
```

Although it is bigger, the loop uses 4 multiplications, 4 add/sub (not counting the loop counter) compared to:

```
X+iY→Z
Z→W
10→I
While I and 2>abs(W
W²+Z→W
I-1→I
End
```

That is more compact, but it uses 1 complex addition (worth 2 Real additions), 1 complex multiplication (worth 3 Real multiplications) and then abs() of a complex number takes 2 multiplications and a square root. Some time is saved because the OS can avoid some parsing slow downs, but my times for testing the operations are:

85 seconds for 10000 square roots (pi/4→C, For() loop just has sqrt(Z))

53 seconds for 10000 squaring operations

131 seconds for 10000 complex squares (pi/4+ipi/4→Z, For() loop just has Z²)

122 seconds for 10000 complex abs()

So in 10000 iterations, the former uses about 212 seconds worth of squaring/multiplying. The latter code uses 253 seconds to do squaring and abs().