playMaker

Author Topic: Are arrays of vector3 slower than a bunch of independent vector3?  (Read 253 times)

wetcircuit

  • Full Member
  • ***
  • Posts: 143
    • wetcircuit.com
I am reading and setting a bunch of quaternions every frame….

While I was experimenting, I was using an independent vector3 for each quaternion read, and for each quaternion set… it was one live state with >100 vector3, but it ran pretty fast.

Then I cleaned up my Playmaker graph to use arrays and LOOP STATE instead. The states are much cleaner now (much easier to edit) but I have lost significant framerate….

Are arrays slower than vector3…, like a LOT slower? (I am also performing more calculations on the quaternions between getting and setting, than I was before, so I expected slower, but this is a LOT slower now)
« Last Edit: November 29, 2021, 09:10:22 AM by wetcircuit »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6868
    • jinxtergames
Re: Are arrays of vector3 slower than a bunch of independent vector3?
« Reply #1 on: November 29, 2021, 11:06:51 AM »
Hi.
for the 'loop' it needs to do it in sequence.
and your less clean version was probably doing it parallel.

But are you using build in array or array maker?
it might be that Array List (array maker) will work faster.

have you tried in a build

wetcircuit

  • Full Member
  • ***
  • Posts: 143
    • wetcircuit.com
Re: Are arrays of vector3 slower than a bunch of independent vector3?
« Reply #2 on: November 29, 2021, 12:30:18 PM »
Ahh, this is all in Editor…  :(

I will try Array List…
and also finish out the 'parallel' version to see how they compare….

Thank you for suggestions!