summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/stringdefs.h
diff options
context:
space:
mode:
authorgoldsteinn <35538541+goldsteinn@users.noreply.github.com>2022-05-24 01:45:31 (GMT)
committerGitHub <noreply@github.com>2022-05-24 01:45:31 (GMT)
commit7108bdf27c7a460cf83c4a01dea54ae4591d8aea (patch)
tree0ebf080594979a194459f6d5f4f30cb6fafffdac /Objects/stringlib/stringdefs.h
parentf7fabae75c7b8ecd0c5673b5d62a15db24a05953 (diff)
downloadcpython-7108bdf27c7a460cf83c4a01dea54ae4591d8aea.zip
cpython-7108bdf27c7a460cf83c4a01dea54ae4591d8aea.tar.gz
cpython-7108bdf27c7a460cf83c4a01dea54ae4591d8aea.tar.bz2
gh-93033: Use wmemchr in stringlib (GH-93034)
Generally comparable perf for the "good" case where memchr doesn't return any collisions (false matches on lower byte) but clearly faster with collisions.
Diffstat (limited to 'Objects/stringlib/stringdefs.h')
-rw-r--r--Objects/stringlib/stringdefs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/stringlib/stringdefs.h b/Objects/stringlib/stringdefs.h
index 88641b2..484b98b 100644
--- a/Objects/stringlib/stringdefs.h
+++ b/Objects/stringlib/stringdefs.h
@@ -24,4 +24,5 @@
#define STRINGLIB_CHECK_EXACT PyBytes_CheckExact
#define STRINGLIB_TOSTR PyObject_Str
#define STRINGLIB_TOASCII PyObject_Repr
+#define STRINGLIB_FAST_MEMCHR memchr
#endif /* !STRINGLIB_STRINGDEFS_H */