parallel array computation (web worker for the browser / thread for node.js)