DEV Community

Cover image for Javascript performance benchmarking (aka JSPerf) with JSBench.me
Mirko Vukušić
Mirko Vukušić

Posted on

Javascript performance benchmarking (aka JSPerf) with JSBench.me

Disclaimer: this is my app and the post is mostly announcement

https://jsbench.me

Long time ago, JSPerf was down for some time and since I was learning React and JSPerf was server-side app, I decided to build my own, SPA version in React. Fast forward to today... JSBench.me is out of beta. v1.0.0 is released.

What is it for?

Well, if you use(d) JSPerf, then explanation is not needed. If not, shortest description would be that it is Javasscript playground (like JSBin, JSFiddle) but for testing performance of your snippets. In the background Benchmark.js runs all tests and JSBench.me is UI for it.

Question? Do you benchmark your Javascript code?

I got a habit of doing it, more as a learning tool than a development tool. Once you realize one way of doing something is faster, you adopt it for future.

What's under the hood?

As said, it is an SPA, built with React and Mobx. Back office is relatively complex mix of AWS services: Cloud Formation, API Gateway, Cognito, Lambda and DynamoDB. So, complete project is in the cloud depending on AWS services. V1 also uses AWS SAM with Cloud Formation to build complete infrastructure from yaml files. Whole project tought me a lot and will produce several posts here, one of which is already here.

Features and what's new in this version

Other than standard test running, you always could save/publish and link your test suites. Voting is also possible. Last version (other than complete rewrite to latest libraries and Typescript) adds many UI helpers that users requested like: sorting tests (drag&drop or buttons), running individual tests in the suite, dark & light theme, manual&auto resizing of code editors, etc. More in the change log

Top comments (8)

Collapse
 
wolverinerv profile image
Richard Varno

If there is a way to donate, please let me know. I found this to be very helpful and easy to use! Thanks!

Collapse
 
psiho profile image
Mirko Vukušić

Thank you for your support. Just yesterday I opened a Patreon page (patreon.com/jsbenchme). I guess it works but haven't really tested it yet. I know it's not a perfect channel for donations in IT (as it is recurring) but was the fastest for now. I'm also looking at the Github sponsors feature now. Github is the homepage of the project (github.com/psiho/jsbench-me).

I must say JSPerf going down caught me by surprise. Amount of users tripled in a short period of time. AWS billing too :) But still, it's far from creating any issues for me. JSBench me will not easily go down, no matter what hosting costs are. But I do feel a bit stupid paying for everything myself and I hate Ads or commercial features in software so I decided to do a test with this. Pandemic situation also made me spend more time on payed projects so development is slowed down. Potentially, donations can change that too.

Again, thanks fr your support. If Patreon does not suite you, just wait up for some other methods, or simple star on Github will be enough. :)

Collapse
 
psiho profile image
Mirko Vukušić

Oh, yes, forgot about BAT (Brave browser rewards system). You can donate BAT through Brave browser on jsbench.me page or through Github page: github.com/psiho/jsbench-me

Collapse
 
wmertens profile image
Wout Mertens

This is great, thank you very much!

I wonder why jsperf was discontinued, was it hosting costs?

I must say that it was very nice to see the benchmarks other people got and their browsers; do you have any aspirations in that direction?

Collapse
 
psiho profile image
Mirko Vukušić • Edited

I don't really know. I dont think it can be hosting costs. It's not a very high volume service.
Yes I also had plans to develop benchmark comparisons and some other options like export/backup tests and most importantly opensourcing the project. It always depended on number of my users. But that has been growing slow but steady last 3 years (faster since Jsperf is down). Currently it's about 14 000 testruns per month.

But since Jsperf is down I got another problem. I surpassed AWS free tier volume and started paying for hosting costs (mostly DynamoDB costs). So optimizing DynamoDB and app in general to cut down on hosting is my first priority now. Then finding sponsors/patrons or any other type of monetization to cover costs is second. That also goes hand in hand with opensourcing it as I don't want to monetize closed source app.

Collapse
 
wolverinerv profile image
Richard Varno

If there is a way to donate, please let me know, I found this very helpful and easy to use! Thanks!

Collapse
 
lokhmakov profile image
Pavel Lokhmakov

Error on login: Migration to a new UserPool Needed! Please use 'Forgot Password' button below to migrate. Extensive changes in JSBench.me v1 required us to change the UserPool.

Collapse
 
psiho profile image
Mirko Vukušić

v1.1 is out. Mostly small bugfixes.