no problemo the first will use some extra memory under runtime, so if you don't have too many possible solution for some object references, always try find it in it's array and store the index instead.
Good luck