for 2d benchmarking, if a function fails (raises an exception), the run should be aborted and its time should be returned as NaN.
for 2d benchmarking, if a function fails (raises an exception), the run should be aborted and its time should be returned as NaN.