Author christian.heimes
Recipients christian.heimes, gvanrossum, rhettinger
Date 2007-12-09.20:51:41
SpamBayes Score 0.0283619
Marked as misclassified No
Message-id <1197233502.08.0.0264421388007.issue1564@psf.upfronthosting.co.za>
In-reply-to
Content
Updates:

* Moved dictobject.c:unicode_eq() to unicodeobject.c:_PyUnicode_Eq()
* Added another optimization step to _PyUnicode_Eq(). The hash is
required later anyway and comparing two hashes is much faster than
memcmp-ing the unicode objects.
    if (unicode_hash(a) != unicode_hash(b))
        return 0;
* Factored out the ((PyUnicodeObject *) v)->hash optimization into a
function object.c:_PyObject_HashFast() which does the trick for
PyUnicode and PyString. The trick was used a couple of times in
dictobject.c and setobject.c. We may even think about moving the trick
to PyObject_Hash() directly.
Files
File name Uploaded
py3k_optimize_set_unicode2.patch christian.heimes, 2007-12-09.20:51:41
History
Date User Action Args
2007-12-09 20:51:42christian.heimessetspambayes_score: 0.0283619 -> 0.0283619
recipients: + christian.heimes, gvanrossum, rhettinger
2007-12-09 20:51:42christian.heimessetspambayes_score: 0.0283619 -> 0.0283619
messageid: <1197233502.08.0.0264421388007.issue1564@psf.upfronthosting.co.za>
2007-12-09 20:51:42christian.heimeslinkissue1564 messages
2007-12-09 20:51:41christian.heimescreate