limzykenneth / p5-benchmark

https://limzykenneth.github.io/p5-benchmark/
BSD 2-Clause "Simplified" License
3 stars 2 forks source link

p5.js Benchmarks

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.

Usage

  1. You should have Firefox and Chrome already installed on your system.
  2. Run npm install.
  3. Run npm test.
  4. Results will be logged in the terminal and in the 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.

Use 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.

Development

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!