Efficiency of list indices in definitions