diff --git a/docs/benchmarks.csv b/docs/benchmarks.csv index 770068a..ff4d1da 100644 --- a/docs/benchmarks.csv +++ b/docs/benchmarks.csv @@ -1,5 +1,5 @@ -pydantic,,24.8μs,0.257μs -toasted-marshmallow,1.6x slower,39.5μs,0.134μs -marshmallow,1.9x slower,47.4μs,0.181μs -trafaret,2.3x slower,56.1μs,0.253μs -django-restful-framework,16.0x slower,397.5μs,0.382μs +pydantic,,12.0μs,0.263μs +toasted-marshmallow,1.9x slower,22.7μs,0.186μs +marshmallow,2.1x slower,25.2μs,0.173μs +trafaret,2.2x slower,26.6μs,0.259μs +django-restful-framework,20.0x slower,240.7μs,1.410μs diff --git a/docs/index.rst b/docs/index.rst index 65d7d63..9568692 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -886,8 +886,20 @@ Below are the results of crude benchmarks comparing *pydantic* to other validati :align: center :file: benchmarks.csv -(See `the benchmarks code `_ -for more details on the test case. Feel free to submit more benchmarks or improve an existing one.) +See `the benchmarks code `_ +for more details on the test case. Feel free to submit more benchmarks or improve an existing one. + +Benchmarks were run with python 3.7.2 and the following package versions: + +* **pydantic** pre ``v0.27`` + `d473f4a `_ compiled with + cython +* **toasted-marshmallow** ``v0.2.6`` +* **marshmallow** the version installed by ``toasted-marshmallow``, see + `this `_ issue. +* **trafaret** ``v1.2.0`` +* **django-restful-framework** ``v3.9.4`` + Contributing to Pydantic ------------------------ diff --git a/setup.py b/setup.py index 85dc463..a3e1a22 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,7 @@ if 'clean' not in sys.argv and 'SKIP_CYTHON' not in os.environ: compiler_directives = {} if 'CYTHON_TRACE' in sys.argv: compiler_directives['linetrace'] = True + os.environ['CFLAGS'] = '-O3' ext_modules = cythonize( 'pydantic/*.py', nthreads=4,