Improved performance for featurize()