Title: Use `wmemchr` in stringlib if `sizeof(STRINGLIB_CHAR) == sizeof(wchar_t)` · Issue #93033 · python/cpython · GitHub
Open Graph Title: Use `wmemchr` in stringlib if `sizeof(STRINGLIB_CHAR) == sizeof(wchar_t)` · Issue #93033 · python/cpython
X Title: Use `wmemchr` in stringlib if `sizeof(STRINGLIB_CHAR) == sizeof(wchar_t)` · Issue #93033 · python/cpython
Description: Feature or enhancement (A clear and concise description of your proposal.) memchr is currently used if sizeof(STRINGLIB_CHAR) == sizeof(char) because it faster than the standard C loops alternatives. wmemchr has often roughly the same pe...
Open Graph Description: Feature or enhancement (A clear and concise description of your proposal.) memchr is currently used if sizeof(STRINGLIB_CHAR) == sizeof(char) because it faster than the standard C loops alternative...
X Description: Feature or enhancement (A clear and concise description of your proposal.) memchr is currently used if sizeof(STRINGLIB_CHAR) == sizeof(char) because it faster than the standard C loops alternative...
Opengraph URL: https://github.com/python/cpython/issues/93033
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use `wmemchr` in stringlib if `sizeof(STRINGLIB_CHAR) == sizeof(wchar_t)`","articleBody":"**Feature or enhancement**\r\n\r\n(A clear and concise description of your proposal.)\r\n\r\n`memchr` is currently used if `sizeof(STRINGLIB_CHAR) == sizeof(char)` because it faster\r\nthan the standard C loops alternatives.\r\n\r\n`wmemchr` has often roughly the same performance as `memchr` and can be used\r\nin the same way as `memchr` to speedup some of the string functions `STRINGLIB(find_char)` \r\nand `STRINGLIB(replace_1char_inplace)` are the two easiest candidates.\r\n\r\n**Pitch**\r\n\r\n(Explain why this feature or enhancement should be implemented and how it would be used.\r\n Add examples, if applicable.)\r\n\r\nIt would, in some instances, make `wide_str.find(wide_str_of_len_one)` faster.\r\n\r\n**Previous discussion**\r\n\r\nThe idea was discussed a bit in #69009 but wasn't the main topic of the issue\r\nor put into any patches.\r\n\u003c!--\r\n New features to Python should first be discussed elsewhere before creating issues on GitHub,\r\n for example in the \"ideas\" category (https://discuss.python.org/c/ideas/6) of discuss.python.org,\r\n or the python-ideas mailing list (https://mail.python.org/mailman3/lists/python-ideas.python.org/).\r\n Use this space to post links to the places where you have already discussed this feature proposal:\r\n-->\r\n\r\n\r\n\u003c!--\r\nYou can freely edit this text. Remove any lines you believe are unnecessary.\r\n-->\r\n","author":{"url":"https://github.com/goldsteinn","@type":"Person","name":"goldsteinn"},"datePublished":"2022-05-20T23:22:44Z","url":"https://github.com/python/cpython/issues/93033"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2e20a4c4-a8c2-280f-b223-92eac0d379d8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD52:39FDE1:7AACAE:99E3B1:6B02104E |
| html-safe-nonce | 5521e86fd5440fe4a92b20e9d799d8920f68ae1e2642dfff8bc895d1331f08e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDUyOjM5RkRFMTo3QUFDQUU6OTlFM0IxOjZCMDIxMDRFIiwidmlzaXRvcl9pZCI6IjM3MDIyMzQ4OTg2ODIyMjA2MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1395eeb440b51aa673ac3036c7f80f8ce4513ff9d9425c9c7c754bb6f74d7c95 |
| hovercard-subject-tag | issue:1243783561 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/93033/issue_layout |
| twitter:image | https://opengraph.githubassets.com/32e69691c949a85281fe1a0833955c1e1a59527197121445febbda7d67ac1191/python/cpython/issues/93033 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/32e69691c949a85281fe1a0833955c1e1a59527197121445febbda7d67ac1191/python/cpython/issues/93033 |
| og:image:alt | Feature or enhancement (A clear and concise description of your proposal.) memchr is currently used if sizeof(STRINGLIB_CHAR) == sizeof(char) because it faster than the standard C loops alternative... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | goldsteinn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width