JavaScript class to test the speed of JavaScript code