René's URL Explorer Experiment


Title: perf: toStringAs appends digits and reverses once by Unisay · Pull Request #7 · purescript-lua/purescript-lua-integers · GitHub

Open Graph Title: perf: toStringAs appends digits and reverses once by Unisay · Pull Request #7 · purescript-lua/purescript-lua-integers

X Title: perf: toStringAs appends digits and reverses once by Unisay · Pull Request #7 · purescript-lua/purescript-lua-integers

Description: Problem toStringAs built its digit sequence with table.insert(t, 1, digit), shifting the whole accumulated table on every loop iteration, quadratic in the digit count. For Int the digit count is bounded (at most 32 in radix 2), so in practice this is a constant-factor cost on a hot formatting path rather than an asymptotic blowup. Flagged by the fork-FFI performance audit, purescript-lua/purescript-lua#186. Change Digits come out of the division loop least-significant first; append them and reverse the joined string once. Each digit is a single ASCII byte for every radix up to 36, so string.reverse cannot split a character. Output is unchanged. Verification scripts/test is green: all 71 regression checks, including the multi-digit, negative and max-Int toStringAs cases that pin digit order (a reversal mistake flips 100 into 001). Measured on 31-digit binary rendering (toStringAs 2 2147483647, 2·10⁵ reps): 1.5× faster under LuaJIT (0.355 s → 0.240 s), 1.6× under PUC Lua 5.1 (1.634 s → 0.992 s). Suggested release: patch (v6.1.3) plus a package-set bump. Refs purescript-lua/purescript-lua#186.

Open Graph Description: Problem toStringAs built its digit sequence with table.insert(t, 1, digit), shifting the whole accumulated table on every loop iteration, quadratic in the digit count. For Int the digit count is bo...

X Description: Problem toStringAs built its digit sequence with table.insert(t, 1, digit), shifting the whole accumulated table on every loop iteration, quadratic in the digit count. For Int the digit count is bo...

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

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:417af712-e8c6-b031-c40d-94e580974b71
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDECC:363D8E:C6B626:FF8F58:6B00EBCD
html-safe-noncef33331bca551523fd345e0ad82c9fb81e006c9b06faaf6097cb7f0d0ad69d2b4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUNDOjM2M0Q4RTpDNkI2MjY6RkY4RjU4OjZCMDBFQkNEIiwidmlzaXRvcl9pZCI6IjIzODQ5Mzc3MTg5NTk5MTI0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4a92cced47bcc5d0c127822755666b8a13b1b68f4d6217b0816e47be9b731abb
hovercard-subject-tagpull_request:4044957523
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-integers/pull/7/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:altProblem toStringAs built its digit sequence with table.insert(t, 1, digit), shifting the whole accumulated table on every loop iteration, quadratic in the digit count. For Int the digit count is bo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/purescript-lua/purescript-lua-integers git https://github.com/purescript-lua/purescript-lua-integers.git
octolytics-dimension-user_id131581790
octolytics-dimension-user_loginpurescript-lua
octolytics-dimension-repository_id779795746
octolytics-dimension-repository_nwopurescript-lua/purescript-lua-integers
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id30888599
octolytics-dimension-repository_parent_nwopurescript/purescript-integers
octolytics-dimension-repository_network_root_id30888599
octolytics-dimension-repository_network_root_nwopurescript/purescript-integers
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-integers/pull/7/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua-integers%2Fpull%2F7%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-integers%2Fpull%2F7%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-integers
Reloadhttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files
Reloadhttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files
Reloadhttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files
purescript-luahttps://github.com/purescript-lua
purescript-lua-integershttps://github.com/purescript-lua/purescript-lua-integers
Codehttps://github.com/purescript-lua/purescript-lua-integers
Issueshttps://github.com/purescript-lua/purescript-lua-integers/issues
Pull requestshttps://github.com/purescript-lua/purescript-lua-integers/pulls
Actionshttps://github.com/purescript-lua/purescript-lua-integers/actions
Security and qualityhttps://github.com/purescript-lua/purescript-lua-integers/security
Insightshttps://github.com/purescript-lua/purescript-lua-integers/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpurescript-lua%2Fpurescript-lua-integers%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-integers%2Fissues%2Fnew%2Fchoose
Unisayhttps://github.com/Unisay
masterhttps://github.com/purescript-lua/purescript-lua-integers/tree/master
issue-186/tostringas-appendhttps://github.com/purescript-lua/purescript-lua-integers/tree/issue-186/tostringas-append
Conversation 0 https://github.com/purescript-lua/purescript-lua-integers/pull/7
Commits 1 https://github.com/purescript-lua/purescript-lua-integers/pull/7/commits
Checks 1 https://github.com/purescript-lua/purescript-lua-integers/pull/7/checks
Files changed https://github.com/purescript-lua/purescript-lua-integers/pull/7/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files
perf: toStringAs appends digits and reverses once https://github.com/purescript-lua/purescript-lua-integers/pull/7/files#top
Show all changes 1 commit https://github.com/purescript-lua/purescript-lua-integers/pull/7/files
21d69df perf: toStringAs appends digits and reverses once Unisay Jul 13, 2026 https://github.com/purescript-lua/purescript-lua-integers/pull/7/commits/21d69df22cc24c372c2ff0183de675d00b07e6bb
Clear filters https://github.com/purescript-lua/purescript-lua-integers/pull/7/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files
20260713_150000_tostringas_append.md https://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-463ae8b404df395578b6562cac7bf2fe6f3afaf85d5ae0dc6dd0f45ab115a7cc
Int.lua https://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-d7699e5771d99fdfb470fa74867344eb5b10c41e989b8328a9649e0f1577cc0e
changelog.d/20260713_150000_tostringas_append.mdhttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-463ae8b404df395578b6562cac7bf2fe6f3afaf85d5ae0dc6dd0f45ab115a7cc
View file https://github.com/purescript-lua/purescript-lua-integers/blob/21d69df22cc24c372c2ff0183de675d00b07e6bb/changelog.d/20260713_150000_tostringas_append.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua-integers/pull/7/{{ revealButtonHref }}
src/Data/Int.luahttps://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-d7699e5771d99fdfb470fa74867344eb5b10c41e989b8328a9649e0f1577cc0e
View file https://github.com/purescript-lua/purescript-lua-integers/blob/21d69df22cc24c372c2ff0183de675d00b07e6bb/src/Data/Int.lua
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua-integers/pull/7/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-d7699e5771d99fdfb470fa74867344eb5b10c41e989b8328a9649e0f1577cc0e
https://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-d7699e5771d99fdfb470fa74867344eb5b10c41e989b8328a9649e0f1577cc0e
https://github.com/purescript-lua/purescript-lua-integers/pull/7/files#diff-d7699e5771d99fdfb470fa74867344eb5b10c41e989b8328a9649e0f1577cc0e
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.