Minor optimization to discrete tabulated functions