Antoine Pitrou added the comment:

Ran some benchmark numbers:

$ ./python -m timeit -s "from pprint import saferepr; s='é\"x' * 1000" 
"saferepr(s)"
-> before patch: 555 usec per loop
-> after patch: 10.9 usec per loop

$ ./python -m timeit -s "from pprint import saferepr; s='xxx' * 1000" 
"saferepr(s)"
-> before patch: 290 usec per loop
-> after patch: 8.68 usec per loop

----------
nosy: +pitrou, serhiy.storchaka
stage:  -> patch review
versions: +Python 3.4

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

Reply via email to