Both dim and nnodes are small, while  ele.getNode(k)->getCoords() is called more times if the sequence the nest loop is changed.