JJ FX Posted August 2, 2019 Share Posted August 2, 2019 (edited) Hi guys, So recently I've been doing some really heavy math within wrangles. And I was disappointed when I checked the performances between a point a prim wrangle. They both have same calculation times. Usually my code goes like: int points[] = primpoints(0, @primnum) for (int i=1; i<len(points); i++) { // Do more stuff here // And even more for loops here } So if this is run in prim wrangle the calculations run per prim (because its a wrangle), and then per point (because of the loop). Switching to point wrangle it should be like (pseudocode): foreach point (because its a point wrangle) { int points[] = primpoints(0, @primnum) for (int i=1; i<len(points); i++) { // Do more stuff here // And even more for loops here } } So it would just create an additional loop, possibly causing some overriding of the values. However both methods performs exactly the same. I've tested it on 30mln points geometry many times. Can any1 explain me why? Edited August 2, 2019 by JJ FX Quote Link to comment Share on other sites More sharing options...
Lucy Coleclough Posted August 2, 2019 Share Posted August 2, 2019 You're doing a pretty similar thing in both wrangles so assuming you have a similar amount of point and prims on the mesh then it would take a similar amount of time. Also you aren't doing the same operation as @primnum in a point wrangle seems to grab a random surrounding prim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.