Optimization about filtering code.