parallelized error calculation