Optimized constant handling