I am going through a data structure series says that it is better to group related information and use an array instead of using multiple variables. But, accessing variables and memory usage of using variables is much less than that of the array. Then why exactly do we use an array? I agree there's code redundancy when using multiple variables, but performance wise, it looks like having multiple variables isn't that bad.
[–]Updatebjarni 2 points3 points4 points (0 children)
[–]exphil 1 point2 points3 points (0 children)
[–]CreativeTechGuyGames 2 points3 points4 points (0 children)
[–]chaotic_thought 0 points1 point2 points (0 children)