[Python-3000] Where is PyUnicodeObject->hash supposed to be set?
Guido van Rossum
guido at python.org
Fri Sep 7 23:20:30 CEST 2007
Can you post the full call graph after this fix (thanks Neil S!)
somewhere, or attach it to an email here?
--Guido
On 9/7/07, Nicholas Bastin <nick.bastin at gmail.com> wrote:
> On 9/7/07, Guido van Rossum <guido at python.org> wrote:
> > It should be set in unicode_hash(). If you compare the trunk version
> > of that function with the py3k branch version, you see that it's been
> > refactored, and in the refactoring, setting ->hash was omitted. It
> > should be trivial to put it back.
>
> Putting it back nets an average 1.8% performance gain for pystone, but
> probably there were other cases that were extremely bad given this
> behaviour. We're still left with another 5 million 'extra' calls to
> PyDict_GetItem in 3.0 over 2.6 in a 100000 cycle pystone run, so I'll
> look around into those, but I suspect none of them will generate any
> larger performance gain.
>
> Someone with more experience than I in the 3.0 development cycle will
> be able to determine what macro-level optimizations / refactoring make
> sense, and what design decisions we're just going to have to pay for.
> At the moment (and probably for the forseeable moments), I'm focusing
> on small improvements across the codebase.
>
> --
> Nick
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list