Do IO once for multiple algorithms.