René's URL Explorer Experiment


Title: Add cmp utility by kov · Pull Request #88 · uutils/diffutils · GitHub

Open Graph Title: Add cmp utility by kov · Pull Request #88 · uutils/diffutils

X Title: Add cmp utility by kov · Pull Request #88 · uutils/diffutils

Description: The utility should support all the functionality supported by GNU cmp and perform quite a bit better. I split the commits for the actual utility in 3, with the base one being a full implementation of the features of GNU cmp, integration tests included. The commits on top of that add optimizations which remove some and then all of rust fmt usage for the potentially long-running loop when --verbose is passed in. I wanted to separate them, first of all because it gives us good base for debugging potential issues with the optimized version, but secondly because I would understand the project preferring the slower version with more readable code. That said, I do think it makes sense to adopt the optimized version as the gains are massive - on the order of 100% gains on my M1 Max comparing ~36M files that are completely different. Following tests run after warming up the I/O cache: Baseline - GNU cmp > hyperfine --warmup 1 -i --output=pipe \ 'cmp -l huge huge.3' Benchmark 1: cmp -l huge huge.3 Time (mean ± σ): 3.237 s ± 0.014 s [User: 2.891 s, System: 0.341 s] Range (min … max): 3.221 s … 3.271 s 10 runs Warning: Ignoring non-zero exit code. Unoptimized diffutils - ~74% of the time > hyperfine --warmup 1 -i --output=pipe \ '../target/release/diffutils cmp -l huge huge.3' Benchmark 1: ../target/release/diffutils cmp -l huge huge.3 Time (mean ± σ): 2.392 s ± 0.009 s [User: 1.978 s, System: 0.406 s] Range (min … max): 2.378 s … 2.406 s 10 runs Warning: Ignoring non-zero exit code. Optimized diffutils - 26% of the time > hyperfine --warmup 1 -i --output=pipe \ '../target/release/diffutils cmp -l huge huge.3' Benchmark 1: ../target/release/diffutils cmp -l huge huge.3 Time (mean ± σ): 849.5 ms ± 6.2 ms [User: 538.3 ms, System: 306.8 ms] Range (min … max): 839.4 ms … 857.7 ms 10 runs Warning: Ignoring non-zero exit code.

Open Graph Description: The utility should support all the functionality supported by GNU cmp and perform quite a bit better. I split the commits for the actual utility in 3, with the base one being a full implementation ...

X Description: The utility should support all the functionality supported by GNU cmp and perform quite a bit better. I split the commits for the actual utility in 3, with the base one being a full implementation ...

Opengraph URL: https://github.com/uutils/diffutils/pull/88

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:326ffcb4-3549-2ef3-1db8-f80ee620cbae
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB60A:8CD9D:E5A1D1:13BA093:6A4DECB9
html-safe-noncebb893d2c5a6eba85849d65828bf3224f671b05c3259242f5d21b3c0546ffe625
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjBBOjhDRDlEOkU1QTFEMToxM0JBMDkzOjZBNERFQ0I5IiwidmlzaXRvcl9pZCI6IjcxMDE2ODkwMzY1NzQ0MjAxNTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac58b7ba881a33d862c8e8688a31e6d47447a03938492b29fd3e3c23cb924e8eb6
hovercard-subject-tagpull_request:2091726130
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/uutils/diffutils/pull/88/files
twitter:imagehttps://avatars.githubusercontent.com/u/1271291?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1271291?s=400&v=4
og:image:altThe utility should support all the functionality supported by GNU cmp and perform quite a bit better. I split the commits for the actual utility in 3, with the base one being a full implementation ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/uutils/diffutils git https://github.com/uutils/diffutils.git
octolytics-dimension-user_id5148717
octolytics-dimension-user_loginuutils
octolytics-dimension-repository_id341787720
octolytics-dimension-repository_nwouutils/diffutils
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id341787720
octolytics-dimension-repository_network_root_nwouutils/diffutils
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
release1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/uutils/diffutils/pull/88/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fuutils%2Fdiffutils%2Fpull%2F88%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://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%2Fuutils%2Fdiffutils%2Fpull%2F88%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=uutils%2Fdiffutils
Reloadhttps://github.com/uutils/diffutils/pull/88/files
Reloadhttps://github.com/uutils/diffutils/pull/88/files
Reloadhttps://github.com/uutils/diffutils/pull/88/files
Please reload this pagehttps://github.com/uutils/diffutils/pull/88/files
uutils https://github.com/uutils
diffutilshttps://github.com/uutils/diffutils
Notifications https://github.com/login?return_to=%2Fuutils%2Fdiffutils
Fork 35 https://github.com/login?return_to=%2Fuutils%2Fdiffutils
Star 270 https://github.com/login?return_to=%2Fuutils%2Fdiffutils
Code https://github.com/uutils/diffutils
Issues 20 https://github.com/uutils/diffutils/issues
Pull requests 12 https://github.com/uutils/diffutils/pulls
Actions https://github.com/uutils/diffutils/actions
Projects https://github.com/uutils/diffutils/projects
Security and quality 0 https://github.com/uutils/diffutils/security
Insights https://github.com/uutils/diffutils/pulse
Code https://github.com/uutils/diffutils
Issues https://github.com/uutils/diffutils/issues
Pull requests https://github.com/uutils/diffutils/pulls
Actions https://github.com/uutils/diffutils/actions
Projects https://github.com/uutils/diffutils/projects
Security and quality https://github.com/uutils/diffutils/security
Insights https://github.com/uutils/diffutils/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fuutils%2Fdiffutils%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fuutils%2Fdiffutils%2Fissues%2Fnew%2Fchoose
oSoMoNhttps://github.com/oSoMoN
uutils:mainhttps://github.com/uutils/diffutils/tree/main
kov:cmphttps://github.com/kov/diffutils/tree/cmp
Conversation 48 https://github.com/uutils/diffutils/pull/88
Commits 4 https://github.com/uutils/diffutils/pull/88/commits
Checks 0 https://github.com/uutils/diffutils/pull/88/checks
Files changed https://github.com/uutils/diffutils/pull/88/files
Please reload this pagehttps://github.com/uutils/diffutils/pull/88/files
Add cmp utility https://github.com/uutils/diffutils/pull/88/files#top
Show all changes 4 commits https://github.com/uutils/diffutils/pull/88/files
72c7802 Take utility name as first parameter on diffutils kov Sep 23, 2024 https://github.com/uutils/diffutils/pull/88/commits/72c7802f0694e44b19832db7f87d9da0c32db5c6
5005741 Add cmp utility kov Sep 23, 2024 https://github.com/uutils/diffutils/pull/88/commits/50057412bdf43159abb2cd0c412969f5a505be1b
2e68130 cmp: avoid using advanced rust formatting for -l kov Sep 25, 2024 https://github.com/uutils/diffutils/pull/88/commits/2e681301b4c652fd8eab304570eaedc3f7ffd663
fac8dab cmp: completely avoid Rust fmt in verbose mode kov Sep 25, 2024 https://github.com/uutils/diffutils/pull/88/commits/fac8dab1823e8b7c7cfe5c468528dc0842a5daab
Clear filters https://github.com/uutils/diffutils/pull/88/files
Please reload this pagehttps://github.com/uutils/diffutils/pull/88/files
Please reload this pagehttps://github.com/uutils/diffutils/pull/88/files
fuzzing.yml https://github.com/uutils/diffutils/pull/88/files#diff-0d1818478ed3978a08c330da0345293a51e13da847c4f41d494b346c3615b94c
Cargo.lock https://github.com/uutils/diffutils/pull/88/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e
Cargo.toml https://github.com/uutils/diffutils/pull/88/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
Cargo.toml https://github.com/uutils/diffutils/pull/88/files#diff-adb6b77ef7d25080f602acb615fefc7d47e8e1321ee09759aae8a4eba6c4ae4b
cmp.txt https://github.com/uutils/diffutils/pull/88/files#diff-224095c84453c892f522eb91a6197e10588c87ca1a551c808c0d936edbf19d7e
fuzz_cmp.rs https://github.com/uutils/diffutils/pull/88/files#diff-bbfd8c3de4e8a5bc6a6400bfac0eddb0a62f55a5a1870134cc54136f25579967
fuzz_cmp_args.rs https://github.com/uutils/diffutils/pull/88/files#diff-0808155b23a46e10821e09c295ee749972a5f3edf0565176814df96b6bcdbd4a
cmp.rs https://github.com/uutils/diffutils/pull/88/files#diff-7bf5a697b08a6059c0d92c440c17a3c407848b68a8a0739ab4e7a5303120523f
diff.rs https://github.com/uutils/diffutils/pull/88/files#diff-25b61929ffc58aa6b4baa8b06a41448eb83835e05c325863e58df00ed841b2d4
lib.rs https://github.com/uutils/diffutils/pull/88/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759
main.rs https://github.com/uutils/diffutils/pull/88/files#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc
params.rs https://github.com/uutils/diffutils/pull/88/files#diff-96db4c2e87979d88bcea716895d0d011b21c2243b7c1e2175e73a25259e43578
utils.rs https://github.com/uutils/diffutils/pull/88/files#diff-23af5356f6001cd3993cd3c801fb7716ea02d1e504081b9fb569332db6107e80
integration.rs https://github.com/uutils/diffutils/pull/88/files#diff-eb771f54a1fdc1c330a82981d7d27d1202a5cbe3a59581ff67af5e3361f5f90e
run-upstream-testsuite.sh https://github.com/uutils/diffutils/pull/88/files#diff-2b209d0321ab7c142493e268f8d4c2eb6804d29aaca05a79e473d8388b0e6d83
.github/workflows/fuzzing.ymlhttps://github.com/uutils/diffutils/pull/88/files#diff-0d1818478ed3978a08c330da0345293a51e13da847c4f41d494b346c3615b94c
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/.github/workflows/fuzzing.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/uutils/diffutils/pull/88/{{ revealButtonHref }}
https://github.com/uutils/diffutils/pull/88/files#diff-0d1818478ed3978a08c330da0345293a51e13da847c4f41d494b346c3615b94c
https://github.com/uutils/diffutils/pull/88/files#diff-0d1818478ed3978a08c330da0345293a51e13da847c4f41d494b346c3615b94c
Cargo.lockhttps://github.com/uutils/diffutils/pull/88/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/Cargo.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/uutils/diffutils/pull/88/files
Cargo.tomlhttps://github.com/uutils/diffutils/pull/88/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/uutils/diffutils/pull/88/{{ revealButtonHref }}
https://github.com/uutils/diffutils/pull/88/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/uutils/diffutils/pull/88/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
fuzz/Cargo.tomlhttps://github.com/uutils/diffutils/pull/88/files#diff-adb6b77ef7d25080f602acb615fefc7d47e8e1321ee09759aae8a4eba6c4ae4b
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/fuzz/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/uutils/diffutils/pull/88/{{ revealButtonHref }}
https://github.com/uutils/diffutils/pull/88/files#diff-adb6b77ef7d25080f602acb615fefc7d47e8e1321ee09759aae8a4eba6c4ae4b
https://github.com/uutils/diffutils/pull/88/files#diff-adb6b77ef7d25080f602acb615fefc7d47e8e1321ee09759aae8a4eba6c4ae4b
fuzz/dictionaries/cmp.txthttps://github.com/uutils/diffutils/pull/88/files#diff-224095c84453c892f522eb91a6197e10588c87ca1a551c808c0d936edbf19d7e
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/fuzz/dictionaries/cmp.txt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/uutils/diffutils/pull/88/{{ revealButtonHref }}
fuzz/fuzz_targets/fuzz_cmp.rshttps://github.com/uutils/diffutils/pull/88/files#diff-bbfd8c3de4e8a5bc6a6400bfac0eddb0a62f55a5a1870134cc54136f25579967
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/fuzz/fuzz_targets/fuzz_cmp.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/uutils/diffutils/pull/88/{{ revealButtonHref }}
fuzz/fuzz_targets/fuzz_cmp_args.rshttps://github.com/uutils/diffutils/pull/88/files#diff-0808155b23a46e10821e09c295ee749972a5f3edf0565176814df96b6bcdbd4a
View file https://github.com/kov/diffutils/blob/fac8dab1823e8b7c7cfe5c468528dc0842a5daab/fuzz/fuzz_targets/fuzz_cmp_args.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/uutils/diffutils/pull/88/{{ revealButtonHref }}
Please reload this pagehttps://github.com/uutils/diffutils/pull/88/files
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.