New submission from Collin Winter <coll...@gmail.com>:

The attached patch adds a --with-py3k-warnings option to configure.
Passing --without-py3k-warnings disables all Py3k compatibility warnings
(the default is to keep the warnings). For production deployments where
performance is more important than warnings no-one will see, this can
provide a useful performance improvement:

2to3 (translate 2to3's source tree five times):
Min: 22.406 -> 22.114: 1.32% faster
Avg: 22.439 -> 22.158: 1.27% faster

Django (render a 150x150 table 100 times):
Min: 0.595 -> 0.586: 1.58% faster
Avg: 0.598 -> 0.588: 1.76% faster

Spitfire (render a 1000x1000 table 100 times):
Min: 0.752 -> 0.743: 1.29% faster
Avg: 0.754 -> 0.745: 1.25% faster

Unpickle (unpickling a list of 8000 dicts 100 times):
Min: 0.305 -> 0.301: 1.41% faster
Avg: 0.307 -> 0.302: 1.49% faster

Build env: gcc 4.3.1 x86_64 on Linux 2.6.18 (Core2 Duo)

----------
assignee: jyasskin
components: Interpreter Core
files: no_py3k_warning.patch
keywords: needs review, patch, patch
messages: 82683
nosy: brett.cannon, collinwinter, jyasskin, pitrou
severity: normal
status: open
title: Add configure option to disable Py3k warnings
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file13168/no_py3k_warning.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to