René's URL Explorer Experiment


Title: perf: drive optimizer fixpoints by change flags instead of whole-module Eq by Unisay · Pull Request #156 · purescript-lua/purescript-lua · GitHub

Open Graph Title: perf: drive optimizer fixpoints by change flags instead of whole-module Eq by Unisay · Pull Request #156 · purescript-lua/purescript-lua

X Title: perf: drive optimizer fixpoints by change flags instead of whole-module Eq by Unisay · Pull Request #156 · purescript-lua/purescript-lua

Description: Closes #144. Builds on the bottom-up driver (#155, merged). fixpointM detected convergence by deep Eq on the whole UberModule every round. Now that the rewrite driver reports precisely whether it rewrote anything, the passes can just say so: Per review feedback, the signal is a dedicated domain type instead of Any: data WasRewritten = Rewritten | Unmodified with a "Rewritten wins" Semigroup, so use sites read tell Rewritten and signatures read SupplyM (Exp, WasRewritten). passRun returns (UberModule, WasRewritten). Unmodified asserts the output is structurally identical to the input; Rewritten says it may differ. The fixpoint members report precisely: optimize aggregates the driver signal across all expressions plus every top-level inlining, and dce combines its driver signal with top-level binding/foreign drops and ForeignImport name-list pruning. Run-once passes report a conservative Rewritten, which nothing consumes. A fixpoint stops on the first round that reports Unmodified, bounded by maxFixpointIterations (100). No runner compares whole modules anymore. The two failure directions land in different runners. Under-reporting (changed but said it didn't) would silently under-optimize, so the checked runner (the whole test suite and --lint-ir) compares the one module a pass claims unchanged against its input and fails with PassUnreportedChange. Over-reporting (said it changed but didn't) would spin the loop, so at the cap the checked runner fails with FixpointDivergence while the production runner accepts the module reached so far. Every pass is semantics-preserving, so an early stop costs optimization, never correctness, and production can no longer hang. idempotently stays as the semantic reference: a property test checks that the signal-driven fixpoint computes exactly what the Eq-driven reference computes when the signal is precise. fixpointM is gone. Since the golden harness runs the checked pipeline, every fixpoint round of every golden test now asserts the signal's precision for free. No golden moved: the fixpoint stops at exactly the round the Eq oracle did, drawing the same supply names. To be honest about the payoff: the raw perf win is modest, since Eq short-circuits on the first difference and only pays a full traversal on the final converged round. The real gains are a precise per-pass signal, loud failures when it misreports, and the per-pass delta that #142/#143 can build on.

Open Graph Description: Closes #144. Builds on the bottom-up driver (#155, merged). fixpointM detected convergence by deep Eq on the whole UberModule every round. Now that the rewrite driver reports precisely whether it r...

X Description: Closes #144. Builds on the bottom-up driver (#155, merged). fixpointM detected convergence by deep Eq on the whole UberModule every round. Now that the rewrite driver reports precisely whether it r...

Opengraph URL: https://github.com/purescript-lua/purescript-lua/pull/156

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:b4701cbb-ce73-ff33-ec61-e42e7efcb3aa
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB858:3D97C8:AA10AD:E4815B:6B00EFAB
html-safe-nonce83c47d4cd2004f80e625d2fe5cc68f3ad7790a8e116830996314163adf0f64f3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODU4OjNEOTdDODpBQTEwQUQ6RTQ4MTVCOjZCMDBFRkFCIiwidmlzaXRvcl9pZCI6IjcwMDI5Mjk2MDkzOTQxNTU0MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8d0784aeda9f02bb8c94488a1fdee063703b8d5e83add0c42fb4047ba1e5b4f3
hovercard-subject-tagpull_request:3990223831
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/purescript-lua/purescript-lua/pull/156/files
twitter:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
og:image:altCloses #144. Builds on the bottom-up driver (#155, merged). fixpointM detected convergence by deep Eq on the whole UberModule every round. Now that the rewrite driver reports precisely whether it r...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git
octolytics-dimension-user_id131581790
octolytics-dimension-user_loginpurescript-lua
octolytics-dimension-repository_id587200487
octolytics-dimension-repository_nwopurescript-lua/purescript-lua
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id587200487
octolytics-dimension-repository_network_root_nwopurescript-lua/purescript-lua
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua/pull/156/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F156%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%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F156%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=purescript-lua%2Fpurescript-lua
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/156/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/156/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/156/files
purescript-luahttps://github.com/purescript-lua
purescript-luahttps://github.com/purescript-lua/purescript-lua
Codehttps://github.com/purescript-lua/purescript-lua
Issues48 (48)https://github.com/purescript-lua/purescript-lua/issues
Pull requestshttps://github.com/purescript-lua/purescript-lua/pulls
Discussionshttps://github.com/purescript-lua/purescript-lua/discussions
Actionshttps://github.com/purescript-lua/purescript-lua/actions
Projectshttps://github.com/purescript-lua/purescript-lua/projects
Security and qualityhttps://github.com/purescript-lua/purescript-lua/security
Insightshttps://github.com/purescript-lua/purescript-lua/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
Unisayhttps://github.com/Unisay
mainhttps://github.com/purescript-lua/purescript-lua/tree/main
issue-144/fixpoint-change-flaghttps://github.com/purescript-lua/purescript-lua/tree/issue-144/fixpoint-change-flag
Conversation 3 https://github.com/purescript-lua/purescript-lua/pull/156
Commits 2 https://github.com/purescript-lua/purescript-lua/pull/156/commits
Checks 2 https://github.com/purescript-lua/purescript-lua/pull/156/checks
Files changed https://github.com/purescript-lua/purescript-lua/pull/156/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/156/files
perf: drive optimizer fixpoints by change flags instead of whole-module Eq https://github.com/purescript-lua/purescript-lua/pull/156/files#top
Show all changes 2 commits https://github.com/purescript-lua/purescript-lua/pull/156/files
f25937e refactor: replace the Any change flag with a domain type (review feed… Unisay Jul 4, 2026 https://github.com/purescript-lua/purescript-lua/pull/156/commits/f25937e7de06e7dbfd3a67845cf7972d29351083
5f85684 perf: drive optimizer fixpoints by change flags instead of whole-modu… Unisay Jul 4, 2026 https://github.com/purescript-lua/purescript-lua/pull/156/commits/5f85684e8a786e48d3816ec4d35010493608f199
Clear filters https://github.com/purescript-lua/purescript-lua/pull/156/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/156/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/156/files
20260704_140000_unisay_fixpoint_change_flag.md https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-2233c3286d19884d94613d0ee9f8a1e9d569b8cfc7e68935d4b528af169957de
DCE.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
Optimizer.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
Pass.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-abae6efc48eb2a5c5262970ee389785ead06f276979fda85fee4d192b5540b32
Types.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-c628fb950daac01f47dc80a039e24b8b452f9d578ab0d55483d10758027b4884
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-0449eea1b029dacff1e3fc29ba0f5301a241e4eda9ca7a835bc9c2c50f7ca544
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-bc1fa00b08aad14838a06a1bfed8842087ce893a8b977678c68deea85c0610a4
changelog.d/20260704_140000_unisay_fixpoint_change_flag.mdhttps://github.com/purescript-lua/purescript-lua/pull/156/files#diff-2233c3286d19884d94613d0ee9f8a1e9d569b8cfc7e68935d4b528af169957de
View file https://github.com/purescript-lua/purescript-lua/blob/5f85684e8a786e48d3816ec4d35010493608f199/changelog.d/20260704_140000_unisay_fixpoint_change_flag.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/156/{{ revealButtonHref }}
lib/Language/PureScript/Backend/IR/DCE.hshttps://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
View file https://github.com/purescript-lua/purescript-lua/blob/5f85684e8a786e48d3816ec4d35010493608f199/lib/Language/PureScript/Backend/IR/DCE.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/156/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
lib/Language/PureScript/Backend/IR/Optimizer.hshttps://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
View file https://github.com/purescript-lua/purescript-lua/blob/5f85684e8a786e48d3816ec4d35010493608f199/lib/Language/PureScript/Backend/IR/Optimizer.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/156/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/156/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/156/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/156/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.