improved performance of features computation