1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
Performance
===========
Negative values mean that the library failed the test.
The tests are done on my PC. The following libraries are tested:
* `typedload`, the 3 most recent versions. It shines with tagged unions, which is what I mostly use.
* `pydantic2` years of work to rewrite it in Rust, [implemented detection of tagged unions years after I did it](https://github.com/pydantic/pydantic/issues/5163#issuecomment-1619203179), still managing to lose some benchmarks 😅
* `apischema` is slower where there are unions, faster otherwise
Using Python 3.13
-----------------







Using Pypy 7.3.17
-----------------







Run the tests
-------------
Generate the performance chart locally.
```bash
python3 -m venv perfvenv
. perfvenv/bin/activate
pip install apischema pydantic attrs
export PYTHONPATH=$(pwd)
make gnuplot
```
|