I have a trigger which will update and call numbers from an array several times a second. It is around 40x15 in size. Each column represents a parameter that I use (15 total), and thus gets very confusing to remember which column to call for which function. I thought that maybe having a record would be easier to keep track of because I could name each parameter. So, the big question I would like to know is this- how computationally efficient are records in comparison to arrays? My guess is that the arrays are more efficient, but by how much? Has anyone had any experience with heavy record use?
It doesn't really matter; they're just storage, and you're not using too much memory by any means. Arrays have the advantage of being able to iterate through each element, though. But if giving them names makes it easier for you to remember their significance, go for that.
Hey community,
I have a trigger which will update and call numbers from an array several times a second. It is around 40x15 in size. Each column represents a parameter that I use (15 total), and thus gets very confusing to remember which column to call for which function. I thought that maybe having a record would be easier to keep track of because I could name each parameter. So, the big question I would like to know is this- how computationally efficient are records in comparison to arrays? My guess is that the arrays are more efficient, but by how much? Has anyone had any experience with heavy record use?
It doesn't really matter; they're just storage, and you're not using too much memory by any means. Arrays have the advantage of being able to iterate through each element, though. But if giving them names makes it easier for you to remember their significance, go for that.
@LosTacos: Go
Thanks. I'll try a go at records then. When you say iterate through, you could have a for loop like Record[x] [4].structfield = XYZ..
or did you mean something else for their limitation?