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 rhettinger
Recipients rhettinger
Date 2013-08-12.20:38:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376339883.0.0.783356566828.issue18719@psf.upfronthosting.co.za>
In-reply-to
Content
This code is only run when the kinds, lengths, and hashes match.  So, the probability of the strings being equal is VERY high.  Accordingly, there is no benefit to an earlier out test to see if the first characters differ.

There is a modest benefit to comparing one-character strings, but that comes at the expense of of testing all other string lengths.

This code is on the critical path for dicts and sets, so we don't want to slow it down with false optimizations or optimizations of special cases that come at the expense of the common, general case.
History
Date User Action Args
2013-08-12 20:38:03rhettingersetrecipients: + rhettinger
2013-08-12 20:38:03rhettingersetmessageid: <1376339883.0.0.783356566828.issue18719@psf.upfronthosting.co.za>
2013-08-12 20:38:02rhettingerlinkissue18719 messages
2013-08-12 20:38:02rhettingercreate