More efficient preprocessing.