Title: Speed up equality comparisons between contiguous byte `memoryview`s with `memcmp()` · Issue #162513 · python/cpython · GitHub
Open Graph Title: Speed up equality comparisons between contiguous byte `memoryview`s with `memcmp()` · Issue #162513 · python/cpython
X Title: Speed up equality comparisons between contiguous byte `memoryview`s with `memcmp()` · Issue #162513 · python/cpython
Description: Feature or enhancement cmp_base() compares each byte with each byte. Contiguous views with the same byte format (B, b or c) can just use memcmp(). Has this already been discussed elsewhere? No response given Links to previous discussion ...
Open Graph Description: Feature or enhancement cmp_base() compares each byte with each byte. Contiguous views with the same byte format (B, b or c) can just use memcmp(). Has this already been discussed elsewhere? No resp...
X Description: Feature or enhancement cmp_base() compares each byte with each byte. Contiguous views with the same byte format (B, b or c) can just use memcmp(). Has this already been discussed elsewhere? No resp...
Opengraph URL: https://github.com/python/cpython/issues/162513
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Speed up equality comparisons between contiguous byte `memoryview`s with `memcmp()`","articleBody":"### Feature or enhancement\n\n[`cmp_base()`](https://github.com/python/cpython/blob/4ec6eb0496922cb466a84a81f9a60253b67fcedc/Objects/memoryobject.c#L3437-L3458) compares each byte with each byte. Contiguous views with the same byte format (`B`, `b` or `c`) can just use `memcmp()`.\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-162514\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/maurycy","@type":"Person","name":"maurycy"},"datePublished":"2026-11-23T23:17:36Z","url":"https://github.com/python/cpython/issues/162513"}
| 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:975cc7fb-5491-3776-c28d-1d1c6b1985c3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D10C:174DE2:E4C2C3:13204F9:6B064C09 |
| html-safe-nonce | 71b6c0070d41affe2f02b257394cdc62bf4573b89f7ea62a3789504056b34401 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTBDOjE3NERFMjpFNEMyQzM6MTMyMDRGOTo2QjA2NEMwOSIsInZpc2l0b3JfaWQiOiIyNzU5NTE2MTE5MDg4NjkxMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fbcaf10eeb3368d9d332c4edd9f23c70baa3a33b797a975950249cd07fa9b160 |
| hovercard-subject-tag | issue:6570850276 |
| 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/162513/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7514641faec31854667d2b029d518c39ce6d48cdd656d4f678d871b58872068d/python/cpython/issues/162513 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7514641faec31854667d2b029d518c39ce6d48cdd656d4f678d871b58872068d/python/cpython/issues/162513 |
| og:image:alt | Feature or enhancement cmp_base() compares each byte with each byte. Contiguous views with the same byte format (B, b or c) can just use memcmp(). Has this already been discussed elsewhere? No resp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maurycy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e |
| 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 | f1f9a08f7c769a37f1dfc18ad43d463c222a7eea |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width