Memoizing conditional gates for feature.