This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Decorater, jbfzs, ncoghlan, r.david.murray, rhettinger, serhiy.storchaka, vstinner, Александр Карпинский
Date 2017-11-24.21:17:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511558249.0.0.213398074469.issue27535@psf.upfronthosting.co.za>
In-reply-to
Content
New benchmark on the emitting a warning which is ignored. Benchmark the PR 4489.


Warning emitted in Python, warnings.warn():

vstinner@apu$ ./python -m perf compare_to master.json ignore.json 
Mean +- std dev: [master] 705 ns +- 24 ns -> [ignore] 838 ns +- 18 ns: 1.19x slower (+19%)

==> +133 ns


Warning emitted in C, PyErr_WarnEx():

vstinner@apu$ python3 -m perf compare_to master2.json ignore2.json 
Mean +- std dev: [master2] 702 ns +- 9 ns -> [ignore2] 723 ns +- 9 ns: 1.03x slower (+3%)

==> +21 ns


C benchmark, attached files:

* bench_c_warn.patch
* bench_ignore_warn_c.py
History
Date User Action Args
2017-11-24 21:17:29vstinnersetrecipients: + vstinner, rhettinger, ncoghlan, r.david.murray, serhiy.storchaka, Decorater, Александр Карпинский, jbfzs
2017-11-24 21:17:28vstinnersetmessageid: <1511558249.0.0.213398074469.issue27535@psf.upfronthosting.co.za>
2017-11-24 21:17:28vstinnerlinkissue27535 messages
2017-11-24 21:17:28vstinnercreate