Monte-carlo integration in JS, single-threaded vs. concurrent