Better code gen for large numbers of codes