animatrix_
For large number of points Attribute Interpolate SOP can crush Attrib Copy in performance. The only issue is that it requires array attributes even if it's only for a single element and weight. RFE submitted: #105259, #124296
So you can create array attributes like this and then use Attribute Interpolate SOP:
i@targetpt = array ( i@targetID );
f@targetweight = array ( 1 );
For 25M points I get about 30% faster performance:
img]https://i.imgur.com/vVUxcUa.png [i.imgur.com]
Thanks for the suggestion, I tried with "Attribute Interpolate Sop" but I'm finding it's very slow compared with "Attribute Copy Sop", even with 20million points. Could you please check the attached file and see if I'm doing something wrong?
In the new file you'll find also a new experimental method: it's a dynamic generation of vex code in Python to transfer the attributes using the simple point(0, "myattrib", i@targetID).
This method seems to be faster than Attribute Copy Sop, with high number of points.
But maybe I just wasted my time, because I'm missing this Attribute Interpolate thing.
Note: I simplified the test scenario, because the earlier version was a bit ambiguous.
I restate the idea: every point is assigned with a unique random targetID, to be used to copy the attributes from another point in the same geo. This produce just a change in the point number, but all the attributes remain in position. So it's like using a "Sort SOP" in random mode.