Thanks for all the feedback peeps. I was checking mainly for my own habits but the case in point is accessing sample data from an audio file. We have a playhead int in one class and the float array in other classes. I am processing several thousand times a tick. It seems like I am not going to get much perf out of making the array public but if there is no drawback, then I will do it anyway. It does not really affect my readability. I was just wondering if there was any magic in the accessor that might have made things faster. Its always good to check because my assumptions have been wrong before :)
↧