diff --git a/python-perfs/perfs.md b/python-perfs/perfs.md index 5485ddc..63388b5 100644 --- a/python-perfs/perfs.md +++ b/python-perfs/perfs.md @@ -467,6 +467,16 @@ Numba est un `JIT` : « Just In Time compiler ». ## numba — À vous ! +# pypy + +pypy est un interpréteur Python écrit en Python. + +```shell +#!cache pyperf timeit --setup 'from examples.collatz_length import collatz_length' 'collatz_length(837799)' + +#!cache pypy3 -m pyperf timeit --setup 'from examples.collatz_length import collatz_length' 'collatz_length(837799)' +``` + # mypyc mypyc est un compilateur qui s'appuie sur les annotationes de type mypy : @@ -537,15 +547,10 @@ $ python -m nuitka --module collatz_length_nuitka.py ```shell #!cache pyperf timeit --setup 'from examples.collatz_length import collatz_length' 'collatz_length(837799)' -#!cache --force -- pyperf timeit --setup 'from examples.collatz_length_nuitka import collatz_length' 'collatz_length(837799)' +#!cache pyperf timeit --setup 'from examples.collatz_length_nuitka import collatz_length' 'collatz_length(837799)' ``` -# Et d'autres… - -https://github.com/pfalcon/awesome-python-compilers - - # Hand crafted C ```c @@ -594,5 +599,5 @@ $ pip install rustimport ```bash #!cache pyperf timeit --setup 'from examples.collatz_length import collatz_length' 'collatz_length(837799)' -#!cache pyperf timeit --setup 'import rustimport.import_hook; from examples.collatz_length_rs import collatz_length' 'collatz_length(837799)' +#!cache pyperf timeit --setup 'import rustimport.import_hook; import rustimport.settings; rustimport.settings.compile_release_binaries = True; from examples.collatz_length_rs import collatz_length' 'collatz_length(837799)' ```