Benchmarks
Below are the results of crude benchmarks comparing pydantic to other validation libraries.
Package | Version | Relative Performance | Mean validation time |
---|---|---|---|
pydantic | 1.0b1 |
46.5μs | |
marshmallow | 2.15.1 |
2.9x slower | 136.1μs |
trafaret | 1.2.0 |
3.3x slower | 154.2μs |
toasted-marshmallow | 2.15.2post1 |
3.4x slower | 159.4μs |
django-restful-framework | 3.10.3 |
12.4x slower | 577.0μs |
See the benchmarks code for more details on the test case. Feel free to suggest more packages to benchmark or improve an existing one.
Benchmarks were run with Python 3.7.4 and the package versions list above installed via pypi on Ubuntu 18.04.