René's URL Explorer Experiment


Title: R23-T059: Document 16^difficulty complexity of proof_of_work, backed by measurements by code-paul-creator · Pull Request #69 · S-AI-Projects/TheAlgorithms-Python · GitHub

Open Graph Title: R23-T059: Document 16^difficulty complexity of proof_of_work, backed by measurements by code-paul-creator · Pull Request #69 · S-AI-Projects/TheAlgorithms-Python

X Title: R23-T059: Document 16^difficulty complexity of proof_of_work, backed by measurements by code-paul-creator · Pull Request #69 · S-AI-Projects/TheAlgorithms-Python

Description: Description Checks the real running time of blockchain/simple_proof_of_work.py against its theoretical complexity. A hash starts with difficulty hex zeros with probability 16^-difficulty, so the expected number of attempts is 16^difficulty. This PR measures attempts and time for difficulty 0-5 and documents the complexity and evidence in the proof_of_work docstring. Related Issue Fixes: #59 Type of Change Bug Fix New Feature UI/UX Improvement Performance Improvement Tests Documentation Refactoring / Maintenance CI/CD Changes Made blockchain/simple_proof_of_work.py: added a Complexity paragraph to the proof_of_work docstring (derivation, O(16^difficulty) time, O(1) space, measured mean attempts). No code or doctest changes; the 7 >>> lines and the negative-difficulty ValueError are unchanged. work/R23-T059/bench.py: times proof_of_work with timeit for difficulty 0-5 (100 / 20000 / 5000 / 1000 / 400 / 60 runs), writes results.csv and a plot. work/R23-T059/COMPLEXITY.md: derivation, results table, plot, and notes on variance. Screenshots / Recordings The benchmark plot is work/R23-T059/pow_benchmark.png (attempts and time vs difficulty, measured points on the 16^difficulty line). Testing python -m pytest --doctest-modules blockchain/simple_proof_of_work.py -> passed ruff check blockchain/simple_proof_of_work.py -> all checks passed python work/R23-T059/bench.py -> mean attempts 16.1 / 258.7 / 4,254 / 64,150 / 1,077,340 for difficulty 1-5 (expected 16 / 256 / 4,096 / 65,536 / 1,048,576); growth per level x16.1, x16.1, x16.4, x15.1, x16.8; every 95% CI contains 16^d Checklist I have tested my changes locally. I have added or updated tests, if needed. I have updated documentation, if needed. I have followed the project's coding guidelines. I have run the relevant tests and checks. I have addressed previous review feedback, if applicable. Additional Notes Attempts are exactly reproducible (SHA-256 is deterministic); times depend on the machine. Individual runs vary a lot (standard deviation about equal to the mean), so only averages follow 16^d; difficulty 5 used 60 runs, so its interval is about +-23%. An early 100-run sample at difficulty 4 gave 0.75x the expected value; re-running with 800 runs gave 0.955x, so it was sampling noise (see COMPLEXITY.md).

Open Graph Description: Description Checks the real running time of blockchain/simple_proof_of_work.py against its theoretical complexity. A hash starts with difficulty hex zeros with probability 16^-difficulty, so the ex...

X Description: Description Checks the real running time of blockchain/simple_proof_of_work.py against its theoretical complexity. A hash starts with difficulty hex zeros with probability 16^-difficulty, so the ex...

Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0c83caed-5b0f-9eec-8bad-1c5dc0b8735b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE5D4:8FB0D:7231D:A1B0E:6AFDFB26
html-safe-nonce95802444b32220c6b67ade580fced906de909b12797ee59843b906eb60f88ace
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUQ0OjhGQjBEOjcyMzFEOkExQjBFOjZBRkRGQjI2IiwidmlzaXRvcl9pZCI6IjE3NzQ5Njk4NDA0NDg5NjEzMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac03ad548706ce709f36ebf861f62d9cff36b79099826fbb1a44536c80888f04f3
hovercard-subject-tagpull_request:5272200930
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
twitter:imagehttps://avatars.githubusercontent.com/u/260575160?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/260575160?s=400&v=4
og:image:altDescription Checks the real running time of blockchain/simple_proof_of_work.py against its theoretical complexity. A hash starts with difficulty hex zeros with probability 16^-difficulty, so the ex...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneee3343385a977757dd145b28fabf4a119780f2615a5a36c5a89f66c9b3b5616d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/S-AI-Projects/TheAlgorithms-Python git https://github.com/S-AI-Projects/TheAlgorithms-Python.git
octolytics-dimension-user_id351892385
octolytics-dimension-user_loginS-AI-Projects
octolytics-dimension-repository_id1444141022
octolytics-dimension-repository_nwoS-AI-Projects/TheAlgorithms-Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id63476337
octolytics-dimension-repository_parent_nwoTheAlgorithms/Python
octolytics-dimension-repository_network_root_id63476337
octolytics-dimension-repository_network_root_nwoTheAlgorithms/Python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release43ae91995f6e2d5ff7a491f3de438f1f723adeaa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-Python%2Fpull%2F69%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-Python%2Fpull%2F69%2Ffiles
Sign uphttps://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=S-AI-Projects%2FTheAlgorithms-Python
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
S-AI-Projectshttps://github.com/S-AI-Projects
TheAlgorithms-Pythonhttps://github.com/S-AI-Projects/TheAlgorithms-Python
Codehttps://github.com/S-AI-Projects/TheAlgorithms-Python
Issues60 (60)https://github.com/S-AI-Projects/TheAlgorithms-Python/issues
Pull requests39 (39)https://github.com/S-AI-Projects/TheAlgorithms-Python/pulls
Actionshttps://github.com/S-AI-Projects/TheAlgorithms-Python/actions
Projectshttps://github.com/S-AI-Projects/TheAlgorithms-Python/projects
Security and qualityhttps://github.com/S-AI-Projects/TheAlgorithms-Python/security
Insightshttps://github.com/S-AI-Projects/TheAlgorithms-Python/insights
Sign up for GitHub https://github.com/signup?return_to=%2FS-AI-Projects%2FTheAlgorithms-Python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FS-AI-Projects%2FTheAlgorithms-Python%2Fissues%2Fnew%2Fchoose
code-paul-creatorhttps://github.com/code-paul-creator
S-AI-Projects:masterhttps://github.com/S-AI-Projects/TheAlgorithms-Python/tree/master
code-paul-creator:R23-T059https://github.com/code-paul-creator/TheAlgorithms-Python/tree/R23-T059
Conversation 0 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69
Commits 2 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/commits
Checks 0 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/checks
Files changed https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
R23-T059: Document 16^difficulty complexity of proof_of_work, backed by measurements https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#top
Show all changes 2 commits https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
d9c1d42 R23-T059: document 16^difficulty complexity of proof_of_work with mea… code-paul-creator Nov 12, 2026 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/commits/d9c1d42dd97e1815f520199d9f63e067760aba95
4832878 R23-T059: add MacBook benchmark results to the complexity notes code-paul-creator Nov 12, 2026 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/commits/48328786ed4dd0c22f85c26b435f2d62f794a457
Clear filters https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
simple_proof_of_work.py https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-708a29e76f161eb97064e4e0a33bf306b50565a9684e58ccd84528fb7da66515
COMPLEXITY.md https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-445862b14e96c3db8f41a64ee5b98e6b210217ed7c99e6b0a3c862b2008efbd7
bench.py https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-43b3638ad7df4bf4f11f9826ff383d58f9ba59682973111c81ee04a7837ab6c3
bench_output.txt https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-5df0deacf9a7862f30ce8da09a7d13fe0150828f5167fa5ad639b36f8c352e20
pow_benchmark.png https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-ca66177e6db45a544fca63a213d66157cba1f2ca29fe2c5ee4b3d30265acb019
results.csv https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-eed4183710d60e8dd330a2ff8d7564ebb28ab5d09f8ee554770e36d05dd6e25d
blockchain/simple_proof_of_work.pyhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-708a29e76f161eb97064e4e0a33bf306b50565a9684e58ccd84528fb7da66515
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/48328786ed4dd0c22f85c26b435f2d62f794a457/blockchain/simple_proof_of_work.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/{{ revealButtonHref }}
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-708a29e76f161eb97064e4e0a33bf306b50565a9684e58ccd84528fb7da66515
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-708a29e76f161eb97064e4e0a33bf306b50565a9684e58ccd84528fb7da66515
work/R23-T059/COMPLEXITY.mdhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-445862b14e96c3db8f41a64ee5b98e6b210217ed7c99e6b0a3c862b2008efbd7
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/48328786ed4dd0c22f85c26b435f2d62f794a457/work/R23-T059/COMPLEXITY.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/{{ revealButtonHref }}
work/R23-T059/bench.pyhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-43b3638ad7df4bf4f11f9826ff383d58f9ba59682973111c81ee04a7837ab6c3
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/48328786ed4dd0c22f85c26b435f2d62f794a457/work/R23-T059/bench.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/{{ revealButtonHref }}
work/R23-T059/bench_output.txthttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-5df0deacf9a7862f30ce8da09a7d13fe0150828f5167fa5ad639b36f8c352e20
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/48328786ed4dd0c22f85c26b435f2d62f794a457/work/R23-T059/bench_output.txt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/{{ revealButtonHref }}
work/R23-T059/pow_benchmark.pnghttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-ca66177e6db45a544fca63a213d66157cba1f2ca29fe2c5ee4b3d30265acb019
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/48328786ed4dd0c22f85c26b435f2d62f794a457/work/R23-T059/pow_benchmark.png
Open in desktop https://desktop.github.com
Reload?https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files
work/R23-T059/results.csvhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/files#diff-eed4183710d60e8dd330a2ff8d7564ebb28ab5d09f8ee554770e36d05dd6e25d
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/48328786ed4dd0c22f85c26b435f2d62f794a457/work/R23-T059/results.csv
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/69/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.