A JavaScript test for detecting the optimal number of web workers to use