jcrist / msgspec

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
https://jcristharif.com/msgspec/
BSD 3-Clause "New" or "Revised" License
2.23k stars 64 forks source link

Set up continuous benchmarking #310

Open jcrist opened 1 year ago

jcrist commented 1 year ago

msgspec is a performance oriented library - would be useful to set up continuous benchmarking as part of our CI to catch any performance regressions. These might make use of airspeed velocity, or something else.

jcrist commented 1 year ago

A few links that might be useful:

jcrist commented 1 year ago

I've seen some libraries are using CodSpeed (https://codspeed.io/) for this now. I'm slightly hesitant to rely on a new closed-source service.

From reading their Python client code, it looks like they're using callgrind to handle instrumentation. Depending on metrics used this may be a nice way to eliminate variation between runs in a public CI environment. Worth considering at least.

jcrist commented 1 year ago

Another potentially useful reference: https://pythonspeed.com/articles/consistent-benchmarking-in-ci/