SUPER FAST way of creating clones ???

Given the magic of HOF's, is there a super fast way of creating Clones?

I tried Create a clone of myself in a Repeat 5000 loop, and it took appr 180 secs !
I expected it would take a bit of time but not almost 3 mins.

Also, relatedly, what goes into creating a clone that it takes so long. The ones I was testing with did not even have any code in them.

Yet, MAP ing the 5000 clones into a list takes almost no time at all, just a few millis.


There's an elegant way using map, namely

but it's not going to be faster than repeat; it's creating the data structure that's taking the time, not the mechanics of looping. Even with no code, the clone has a costume to draw onstage, a position and direction, a zillion things like that.

Just use warp around the repeat loop! :slight_smile:

Wow, 1.7 secs total !

Even this one wrapped in WARP is pretty fast @ 1.8secs. Thx.