[issue32630] Migrate decimal to use PEP 567 context variables

Elvis Pranskevichus report at bugs.python.org
Fri Jan 26 17:24:08 EST 2018


Elvis Pranskevichus <elvis at magic.io> added the comment:

FWIW, I ran bm_telco with pyperformance on a benchmark-tuned system and did not observe the slowdown.  Benchmarks were done on a release build (--enable-optimizations)

$ sudo (which python3) -m perf system tune

MASTER:

$ pyperformance run --python=envs/3.7-master-pgo-lto/prefix/bin/python3.7m --affinity=2,3 --rigorous --benchmarks=telco -o json/3.7-master.json
Python benchmark suite 0.6.1

[1/1] telco...
INFO:root:Running `/home/elvis/dev/python/performance/venv/cpython3.7-8cfe759dd297/bin/python -u /home/elvis/dev/python/performance/performance/benchmarks/bm_telco.py --rigorous --affinity=2,3 --output /tmp/tmpgszxc792`
.........................................
telco: Mean +- std dev: 9.17 ms +- 0.32 ms


MASTER + contextvars patch:

$ pyperformance run --python=envs/3.7-master-pgo+lto+decimal-contextvars/prefix/bin/python3.7m --affinity=2,3 --rigorous --benchmarks=telco -o json/3.7-contextvars.json
Python benchmark suite 0.6.1

[1/1] telco...
INFO:root:Running `/home/elvis/dev/python/performance/venv/cpython3.7-8a6fbdee5a5b/bin/python -u /home/elvis/dev/python/performance/performance/benchmarks/bm_telco.py --rigorous --affinity=2,3 --output /tmp/tmp8y4mivnp`
.........................................
telco: Mean +- std dev: 9.29 ms +- 0.19 ms


COMPARISON:

### telco ###
Mean +- std dev: 9.17 ms +- 0.32 ms -> 9.29 ms +- 0.19 ms: 1.01x slower
Not significant

----------
nosy: +Elvis.Pranskevichus

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32630>
_______________________________________


More information about the Python-bugs-list mailing list