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 loewis
Recipients lemburg, loewis, pitrou, python-dev, vstinner
Date 2011-10-13.16:05:32
SpamBayes Score 4.309775e-06
Marked as misclassified No
Message-id <4E970C4B.3050307@v.loewis.de>
In-reply-to <1318515446.3209.3.camel@localhost.localdomain>
Content
> I would rather propose to simplify the needle heuristic and only use it
> when the lower byte is non-zero. A properly optimized memchr() (as in
> the glibc / gcc) is definitely faster than our naïve loop.

That would be fine as well. Not sure if a heuristics would be needed in
this case at all: it's probably uncommon that you search for a single
character whose lower-half is 0 (most likely you are then searching for
the null character, and not, say, LATIN CAPITAL LETTER A WITH DOUBLE
GRAVE).

In any case, I still think that the heuristics (if any) needs to be
explained better, and needs some justification in the first place.
History
Date User Action Args
2011-10-13 16:05:33loewissetrecipients: + loewis, lemburg, pitrou, vstinner, python-dev
2011-10-13 16:05:32loewislinkissue13134 messages
2011-10-13 16:05:32loewiscreate