Training improves visual processing speed and generalizes to untrained functions