I have built the spidermonkey from source successfully ,all that I am confused is how can I test its performance? Fortunaly, I see many test js files in the /js/src/tests folder in FFsource code, so, can I take adventage of these test files? And how ?
Asked
Active
Viewed 35 times
1 Answers
0
Those tests are reference tests for correctness purposes. Performance tests you'll generally run yourself along these lines:
$ 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
Make sure you're running an optimized build and be sure to turn on the JIT flags.

cdleary
- 69,512
- 53
- 163
- 191