Is calling PivotTo() faster/more optimized than directly changing the CFrame of a part?

I’m working on a voxel building game (Discord for those interested), and I’m attempting to optimize the pulling/culling systems to the best of my ability. On the Creator Hub article, the following is stated:

I remember a post on the DevForum stating the same. Does this mean that calling PivotTo() on a part is faster/has less overhead than directly setting the CFrame (which does fire property changed events)? Thanks.

This isn’t an answer, but you could always benchmark. For example, you could run a loop that changes the cframe x amount of times. After, check the time and see how long it took. Compare both to get your result. Sorry for not providing an answer, I can’t at the momment.

1 Like

From personal experience, no (I have tested different options, looking at the result in the MicroProfiler)

What I found out is welding all the parts of the model together, and directly changing the CFrame property of the anchored part (might work on other parts as well, unsure), is the fastest

If you are moving parts that aren’t models, use BulkMoveTo(), and if you can’t use BulkMoveTo() because you only got a single part to move, then you should not worry about performance

If you have multiple models to move, you can pass the anchored part of the model to BulkMoveTo(), to be able to move multiple models with BulkMoveTo()

1 Like