title: Is it more efficient to access array elements through the array than to get them through a function?
body: <p>I'm thinking about making an object that consists of a large grid, stored in a two dimensional array, and functions that work on that grid.</p>
  
  <p>If I want to iterate through the elements in this array outside of the object, the most readable and privacy-respectful way to access each grid element would be to use a function like grid.getElement(x,y), which simply returns array[x][y].</p>
  
  <p>When the program is compiled into bytecode, is this any less efficient than directly accessing the array by means of grid.array[x][y]?</p>