This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients
Date 2001-05-22.23:04:50
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=31435

Marked accepted.  Looks good!

Suggest

return a->ob_size == b->ob_size &&
       *a->ob_sval == *b->ob_sval &&
       memcmp(a->ob_sval, b->ob_sval, a->ob_size) == 0;

for the tail of the _PyString_Eq body as compilers should 
have an easier time of turning that into the best code for 
the platform (especially the weaker compilers do better 
optimizing expressions than across branches).  Plus it 
improves clarity, at least for me.

Unsure why the

case Py_EQ: c = c == 0; break; /* not needed here */

case is there:  if it's truly unreacable (and I agree it 
isn't), better to assert-fail if it gets there.
History
Date User Action Args
2007-08-23 15:05:43adminlinkissue424335 messages
2007-08-23 15:05:43admincreate