This repo contains the benchmarking code for p5.js. You can run it locally to compare between versions of p5.js. It will also run in a consistent CI environment to generate performance benchmarks over time that can be compared with each other.
npm install
.npm test
.results
folder.If you want more information from the results or change the browsers being tested, you can modify karma.conf.js
to fit your test cases.
TLDR: You probably don't need this.
Optimizing for performance is not something of high priority to p5.js, cleaner code and beginner friendliness always have higher priority. However, if better performance can be achieved without sacrificing cleaner code and beginner friendliness, it definitely can be explored.
In other words, if you are working on the source code for p5.js, you won't need this repo unless you are specifically working on improving performance. Also see below for a few points on how to compare performance numbers.
Follow the same steps as Usage
to setup.
For now the aim will be to make the test easily configured to run on different versions of p5.js, even custom built ones.
It would be nice to have a constantly updated visual graph for the running benchmarks.
More benchmarks of the remaining functions in p5.js.
Open an issue if you have an idea for any of the above and/or want to work on it!