precompute takes 1m40s