[New-bugs-announce] [issue15226] max( str ) should be fast with PEP 393

Glenn Linderman report at bugs.python.org
Fri Jun 29 21:53:25 CEST 2012

New submission from Glenn Linderman <v+python at g.nevcal.com>:

This is stupid code, but it should be faster with PEP 393 than before, should it not?

str = ' ' * 5000000 + "this is really a string example....wow!!!";
for ix in range( 9000 ):
    z = max(str)
print("Max character: " + max(str))

While the new C API seems to support quickly finding the max character in a string, Python code does not benefit.

components: Interpreter Core
messages: 164351
nosy: v+python
priority: normal
severity: normal
status: open
title: max( str ) should be fast with PEP 393
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list