-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set-up benchmarking against other engines #1924
Comments
Just dumping some ideas.. Hyperfine seems like it would be good for this, and maybe a separate repo under the boa-dev umbrella which can periodically run. Something like test262 would be too much, so would need to be just a couple of JS scripts, like 3 or 4 max for now. |
This repo is pretty old but it contains a bunch of benchmark scripts that should be usable. |
I just modify the benchmark above so it can work with boa. Here's the result from @CYBAI
And here's V8's:
I haven't tested the rest because some of them will stuck. |
Hey @wusyong great work on this, I had some questions. |
I don't this is the best benchmark tbh. This benchmark has been archived by mozilla. |
@jasonwilliams @wusyong I think that if boa is around these numbers
Then there is still a long way to go here compared to the numbers QuickJS published |
I posted this in the Discord on I just finished independently running the benchmarks myself, let me share the numbers now. It does look like there's a 25-30x hit in performance if you compare Boa to QuickJS. Here's QuickJS and various other engines compared with each other: https://bellard.org/quickjs/bench.html Boa V8 benchmark results:
QuickJS V8 benchmark results:
It's very easy to run the benchmarks. You need this archive: https://bellard.org/quickjs/quickjs-extras-2021-03-27.tar.xz To run quickjs V8 benchmarks: Check out their github repo and copy the bench-v8 from the archive to To run boa V8 benchmarks: Check out the github repo, build using |
Thanks for this @lastmjs its quite informative. So I think we need to do a few things here:
Let me know if there’s any of these you’d like to collaborate on it any. I understand how important performance is and we’ll hopefully chat about it when we’re next together. |
I can setup the benchmarking CI using the benchmarking framework I shared if that's what we'd like to do. It should be relatively simple and would at least get us started with measuring. Also, for my company's purposes we really need optimizations besides JIT because we're executing in a Wasm runtime. There should be ~30x improvement without JIT. |
@lastmjs it would be good to see https://github.com/GoogleChromeLabs/jsvu be used so we can test against engines other than quickjs here is an example https://github.com/mathiasbynens/string-prototype-replace-regexp-benchmark/blob/main/bench.sh would be good to see something like hyperfine used too |
I'm suggesting using the V8 benchmarks, are you suggesting combining those benchmarks with The simplest thing to start with would be getting the V8 benchmarks to run in CI, so we can compare against this chart: https://bellard.org/quickjs/bench.html |
Yes I'm suggesting this. |
This is all done with the V8 benchmarks: https://bellard.org/quickjs/bench.html Everything I have shared so far has been using the V8 benchmarks. |
In order for us to keep on track with making sure we're focusing on performance i propose we retire the current benchmarks we have and migrate to the V8 benchmarks quickjs were using. Funnily enough quickJS have moved away from that benchmark suite now to something they have built-in but I still think it should make for a better benchmark that we have today. The current suite is no longer useful or serving its purpose, it was created a long time ago and there have been so many optimizations since then that the numbers on the graphs are so out of magnitude you can't make use of it today. Also the things we were benchmarking or checking have either changed or we've refactored so we (the maintainers) don't look at that page too often. Although the v8 benches are no longer used by V8 themselves they will still serve a useful purpose for us at least until we reach a point where we're much closer to the other engines. I would propose us having a nightly job which can take the bench-v8 from the archive like @lastmjs showed and run the latest boa vs other engines from esvu or eshost then print the results into a JSON file on the data repo. The website can take that data and generate some graphs with it. We can start of with this job running as a Github action, but if its too noisy we can move it to a dedicated server. EnginesDuktapeNavigating to https://github.com/svaarala/duktape/releases/tag/v2.7.0 and download duktape-2.7.0.tar.xz
JerryScriptNeeds to be built from source https://github.com/jerryscript-project/jerryscript?tab=readme-ov-file QuickJSesvu V8esvu SpiderMonkeyesvu Kieselmore info: https://blog.chromium.org/2010/10/v8-benchmark-suite-updated.html?m=1 |
We have new benchmarks https://boajs.dev/benchmarks |
Closing by the previous comment. |
Currently, we run benchmarks to improve (or at least not regress) on the performance of Boa. This is a very good approach, but we are missing proper benchmarking against other JavaScript engines.
Particularly, it would be interestint to benchmark against
Any other possible engine would also fit. The idea is to store these comparisons for each commit, the same way we do it for our own benchmarks. We can either create new benchmarks, or try to replicate our benchmarks in those engines, and store their values on each commit.
The text was updated successfully, but these errors were encountered: