Speed-path test in javascript