Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经成功地从源代码构建了spidermonkey,我唯一困惑的是如何测试它的性能?幸运的是,我在FFsource code的/js/src/tests文件夹中看到了很多测试js文件,所以我可以冒险吗?这些测试文件?如何 ?
这些测试是用于正确性目的的参考测试。您通常会按照以下方式进行性能测试:
$ cat test.js var accum = 1; for (let i = 0; i < 1000000000; ++i) accum = accum * 1.0000001 + 1; print(accum); $ ./js -m -n -b test.js 2.6881041239718265e+50 runtime = 7313.683 ms
确保您正在运行优化的构建并确保打开 JIT 标志。