| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4746d37c-0b97-89d8-8259-0dd1f016e3b2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 85CE:258BE8:198B7E5:21E6E23:696AEFD0 |
| html-safe-nonce | 940532a864a5f7ca267bf92ff6ee2481ffead150562ee59782228ba898ba7690 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUNFOjI1OEJFODoxOThCN0U1OjIxRTZFMjM6Njk2QUVGRDAiLCJ2aXNpdG9yX2lkIjoiMjcwMzQ0Mzg5MTgwODAzODg2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2eecfeb93bf2e4d404bff404e98bacc5fb39a511fee2305d5122f546bb0ddc25 |
| hovercard-subject-tag | pull_request:501881260 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/22679/files |
| twitter:image | https://avatars.githubusercontent.com/u/36520290?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/36520290?s=400&v=4 |
| og:image:alt | https://bugs.python.org/issue41972 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/22679/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F22679%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F22679%2Ffiles |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/22679/files |
| Reload | https://github.com/python/cpython/pull/22679/files |
| Reload | https://github.com/python/cpython/pull/22679/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/22679/files |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
33.9k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
71.1k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Code
| https://github.com/python/cpython |
|
Issues
5k+
| https://github.com/python/cpython/issues |
|
Pull requests
2.1k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
31
| https://github.com/python/cpython/projects |
|
Security
Uh oh!
There was an error while loading. Please reload this page.
| https://github.com/python/cpython/security |
| Please reload this page | https://github.com/python/cpython/pull/22679/files |
|
Insights
| https://github.com/python/cpython/pulse |
|
Code
| https://github.com/python/cpython |
|
Issues
| https://github.com/python/cpython/issues |
|
Pull requests
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
| https://github.com/python/cpython/projects |
|
Security
| https://github.com/python/cpython/security |
|
Insights
| https://github.com/python/cpython/pulse |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| sweeneyde | https://github.com/sweeneyde |
| python:master | https://github.com/python/cpython/tree/master |
| sweeneyde:two-way | https://github.com/sweeneyde/cpython/tree/two-way |
|
Conversation
9
| https://github.com/python/cpython/pull/22679 |
|
Commits
21
| https://github.com/python/cpython/pull/22679/commits |
|
Checks
0
| https://github.com/python/cpython/pull/22679/checks |
|
Files changed
| https://github.com/python/cpython/pull/22679/files |
| Please reload this page | https://github.com/python/cpython/pull/22679/files |
|
bpo-41972: Use the "Two-Way" algorithm when searching for long substrings
| https://github.com/python/cpython/pull/22679/files#top |
|
Show all changes
21 commits
| https://github.com/python/cpython/pull/22679/files |
|
899f289
initial implementation
sweeneyde Oct 11, 2020
| https://github.com/python/cpython/pull/22679/commits/899f2894c22575f12c80081aae8959af5e8ada2e |
|
743a382
refactoring
sweeneyde Oct 12, 2020
| https://github.com/python/cpython/pull/22679/commits/743a382f447f38ccd31c98db0e215c1f6293e88a |
|
fdb6800
formatting fixes
sweeneyde Oct 12, 2020
| https://github.com/python/cpython/pull/22679/commits/fdb68009f7c4ef4d9c549b6a0e5bcc76926b90d3 |
|
737ac8a
add shift and bloom
sweeneyde Oct 12, 2020
| https://github.com/python/cpython/pull/22679/commits/737ac8a3a328e0c5f00a918e6e8308d42a878917 |
|
658038d
📜🤖 Added by blurb_it.
blurb-it[bot] Oct 12, 2020
| https://github.com/python/cpython/pull/22679/commits/658038d575e519c05d9b734b0f5f3f7ea988193b |
|
b62e4c6
add alternating find_char calls
sweeneyde Oct 14, 2020
| https://github.com/python/cpython/pull/22679/commits/b62e4c69d31a3bc6cb50a235e7288105712617dd |
|
25a61fb
USe a shift table
sweeneyde Oct 14, 2020
| https://github.com/python/cpython/pull/22679/commits/25a61fb596f3c640d4efda445d1a4f6610aa4c5c |
|
64b9a0a
compute a shift for the last character
sweeneyde Oct 14, 2020
| https://github.com/python/cpython/pull/22679/commits/64b9a0a3e54ed863a88610ce602f0ce90502d0af |
|
5568ca2
Remove unnecessary special case
sweeneyde Oct 14, 2020
| https://github.com/python/cpython/pull/22679/commits/5568ca2b75006791ceeec6a310822530031e97e3 |
|
f2054e0
Merge branch 'two-way' of https://github.com/sweeneyde/cpython into t…
sweeneyde Oct 14, 2020
| https://github.com/python/cpython/pull/22679/commits/f2054e008ceb1ef4f2e668530bc1bc6847db56ee |
|
415f492
removed unneeded shift computation
sweeneyde Oct 15, 2020
| https://github.com/python/cpython/pull/22679/commits/415f49253d787a8f6a3118efac775b2d8dfd686e |
|
06c3678
restore original code with special case for long needles
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/06c3678ba3661bce4ddbb2cf8b39b55f562849d0 |
|
89bdc34
Minor code cleanups
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/89bdc3459cc63cc2c2d8be6ef9ec8b66f9550d31 |
|
9d7bbc3
Restore comment and fix typo
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/9d7bbc38ddcdc640779e511f785a461d08cadf14 |
|
c331307
Update 2020-10-12-23-46-49.bpo-41972.0pHodE.rst
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/c3313075db46012570f2e754414ae8942b03a41e |
|
66377ce
Add test cases catered to the new algorithm
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/66377cee02500bafc633bc343ad63f5801577de7 |
|
e718e5a
Merge branch 'two-way' of https://github.com/sweeneyde/cpython into t…
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/e718e5afb149c336f0c20f7849eb00d713d80acc |
|
cf4e398
Fix typo
sweeneyde Oct 17, 2020
| https://github.com/python/cpython/pull/22679/commits/cf4e398e941fe810eb0bea00d4ad9c87fb2f98bc |
|
3933992
add a cutoff for haystack length
sweeneyde Oct 19, 2020
| https://github.com/python/cpython/pull/22679/commits/39339921ee7a52001f5fd7636637c81052b639da |
|
c8e54c6
simplify a couple of lines
sweeneyde Oct 19, 2020
| https://github.com/python/cpython/pull/22679/commits/c8e54c6eb86bf80e163543040f72eefd59e54bd2 |
|
8208853
Add better threshholds
sweeneyde Oct 19, 2020
| https://github.com/python/cpython/pull/22679/commits/820885368bca9ec01b5536bbd9fc789ba1e9bf3e |
|
Clear filters
| https://github.com/python/cpython/pull/22679/files |
| Please reload this page | https://github.com/python/cpython/pull/22679/files |
| Please reload this page | https://github.com/python/cpython/pull/22679/files |
|
string_tests.py
| https://github.com/python/cpython/pull/22679/files#diff-7d8595e2ffcdcbf3222473c387d3f3da8344cfccd6e460dba3e726d2220ab0a7 |
|
2020-10-12-23-46-49.bpo-41972.0pHodE.rst
| https://github.com/python/cpython/pull/22679/files#diff-3a4fdca6afa19bd805798cbf948d54a32ca15823e1e47f63e48f42a2248e6c6c |
|
fastsearch.h
| https://github.com/python/cpython/pull/22679/files#diff-67ae1b84396bc0119774489a3e62be151a8e1b1317a63c540f976d57d3e0489d |
| Lib/test/string_tests.py | https://github.com/python/cpython/pull/22679/files#diff-7d8595e2ffcdcbf3222473c387d3f3da8344cfccd6e460dba3e726d2220ab0a7 |
|
View file
| https://github.com/sweeneyde/cpython/blob/820885368bca9ec01b5536bbd9fc789ba1e9bf3e/Lib/test/string_tests.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/22679/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/22679/files#diff-7d8595e2ffcdcbf3222473c387d3f3da8344cfccd6e460dba3e726d2220ab0a7 |
|
| https://github.com/python/cpython/pull/22679/files#diff-7d8595e2ffcdcbf3222473c387d3f3da8344cfccd6e460dba3e726d2220ab0a7 |
|
| https://github.com/python/cpython/pull/22679/files#diff-7d8595e2ffcdcbf3222473c387d3f3da8344cfccd6e460dba3e726d2220ab0a7 |
|
| https://github.com/python/cpython/pull/22679/files#diff-7d8595e2ffcdcbf3222473c387d3f3da8344cfccd6e460dba3e726d2220ab0a7 |
| Misc/NEWS.d/next/Core and Builtins/2020-10-12-23-46-49.bpo-41972.0pHodE.rst | https://github.com/python/cpython/pull/22679/files#diff-3a4fdca6afa19bd805798cbf948d54a32ca15823e1e47f63e48f42a2248e6c6c |
|
View file
| https://github.com/sweeneyde/cpython/blob/820885368bca9ec01b5536bbd9fc789ba1e9bf3e/Misc/NEWS.d/next/Core%20and%20Builtins/2020-10-12-23-46-49.bpo-41972.0pHodE.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/22679/{{ revealButtonHref }} |
| Please reload this page | https://github.com/python/cpython/pull/22679/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |