René's URL Explorer Experiment


Title: fix: optimize dayOfWeek & dateFromEpoch routines in date by MaxGraey · Pull Request #3033 · AssemblyScript/assemblyscript · GitHub

Open Graph Title: fix: optimize dayOfWeek & dateFromEpoch routines in date by MaxGraey · Pull Request #3033 · AssemblyScript/assemblyscript

X Title: fix: optimize dayOfWeek & dateFromEpoch routines in date by MaxGraey · Pull Request #3033 · AssemblyScript/assemblyscript

Description: floorDiv(year, 400) -> floorDiv(floorDiv(year, 100), 4) Since arithmetic shift year >> 2 is equal to floorDiv(year, 4): century = floorDiv(year, 100) floorDiv(century, 4) -> century >> 2 And full simplifcation: floorDiv(year, 4) - floorDiv(year, 100) + floorDiv(year, 400) -> (year >> 2) - century + (century >> 2) Also added couple of tests I've read the contributing guidelines I've added my name and email to the NOTICE file

Open Graph Description: floorDiv(year, 400) -> floorDiv(floorDiv(year, 100), 4) Since arithmetic shift year >> 2 is equal to floorDiv(year, 4): century = floorDiv(year, 100) floorDiv(century, 4) -> centur...

X Description: floorDiv(year, 400) -> floorDiv(floorDiv(year, 100), 4) Since arithmetic shift year >> 2 is equal to floorDiv(year, 4): century = floorDiv(year, 100) floorDiv(century, 4) -...

Opengraph URL: https://github.com/AssemblyScript/assemblyscript/pull/3033

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:e6cb553f-041b-c396-dea7-a4546b30aede
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCB62:338BC:434773:5A8BC6:6B008CD3
html-safe-nonce90ffc80f2f73ecfc1881aabdb0325c8c1b3f3731944ffdfe3142477f6c70a600
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjYyOjMzOEJDOjQzNDc3Mzo1QThCQzY6NkIwMDhDRDMiLCJ2aXNpdG9yX2lkIjoiNDQ1OTAzODI4NTg4NDY1MzYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf61b55a51e55a64f9ed4436bc54fec415bf198486f56b66d34c7dc95f76b1d90
hovercard-subject-tagpull_request:4017973152
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/AssemblyScript/assemblyscript/pull/3033/files
twitter:imagehttps://avatars.githubusercontent.com/u/1301959?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1301959?s=400&v=4
og:image:altfloorDiv(year, 400) -> floorDiv(floorDiv(year, 100), 4) Since arithmetic shift year >> 2 is equal to floorDiv(year, 4): century = floorDiv(year, 100) floorDiv(century, 4) -> centur...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec710a5cb5c47be60abfe6e8410436d409906979dbed614ef09f29c60f5535b08
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/AssemblyScript/assemblyscript git https://github.com/AssemblyScript/assemblyscript.git
octolytics-dimension-user_id28916798
octolytics-dimension-user_loginAssemblyScript
octolytics-dimension-repository_id105138356
octolytics-dimension-repository_nwoAssemblyScript/assemblyscript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id105138356
octolytics-dimension-repository_network_root_nwoAssemblyScript/assemblyscript
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
releasebe616a2a6ec1c609d6e002896dff5352d5c5f28b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/AssemblyScript/assemblyscript/pull/3033/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAssemblyScript%2Fassemblyscript%2Fpull%2F3033%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%2FAssemblyScript%2Fassemblyscript%2Fpull%2F3033%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=AssemblyScript%2Fassemblyscript
Reloadhttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
Reloadhttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
Reloadhttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
AssemblyScripthttps://github.com/AssemblyScript
assemblyscripthttps://github.com/AssemblyScript/assemblyscript
Codehttps://github.com/AssemblyScript/assemblyscript
Issues196 (196)https://github.com/AssemblyScript/assemblyscript/issues
Pull requests24 (24)https://github.com/AssemblyScript/assemblyscript/pulls
Actionshttps://github.com/AssemblyScript/assemblyscript/actions
Wikihttps://github.com/AssemblyScript/assemblyscript/wiki
Security and qualityhttps://github.com/AssemblyScript/assemblyscript/security
Insightshttps://github.com/AssemblyScript/assemblyscript/insights
Sign up for GitHub https://github.com/signup?return_to=%2FAssemblyScript%2Fassemblyscript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FAssemblyScript%2Fassemblyscript%2Fissues%2Fnew%2Fchoose
MaxGraeyhttps://github.com/MaxGraey
AssemblyScript:mainhttps://github.com/AssemblyScript/assemblyscript/tree/main
MaxGraey:date-perfhttps://github.com/MaxGraey/assemblyscript/tree/date-perf
Conversation 5 https://github.com/AssemblyScript/assemblyscript/pull/3033
Commits 4 https://github.com/AssemblyScript/assemblyscript/pull/3033/commits
Checks 15 https://github.com/AssemblyScript/assemblyscript/pull/3033/checks
Files changed https://github.com/AssemblyScript/assemblyscript/pull/3033/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
fix: optimize dayOfWeek & dateFromEpoch routines in date https://github.com/AssemblyScript/assemblyscript/pull/3033/files#top
Show all changes 4 commits https://github.com/AssemblyScript/assemblyscript/pull/3033/files
10c288b fix: speedup dayOfWeek MaxGraey Jul 8, 2026 https://github.com/AssemblyScript/assemblyscript/pull/3033/commits/10c288b18996c8d65b8fcdae06ed1dd2c397cf19
34f5d5d refaxctor MaxGraey Jul 9, 2026 https://github.com/AssemblyScript/assemblyscript/pull/3033/commits/34f5d5dc7d68b095f9d086169143cdd010f8d720
9893245 refactor more (nfc) MaxGraey Jul 9, 2026 https://github.com/AssemblyScript/assemblyscript/pull/3033/commits/9893245a71e274f06198f51b214a35e4a50f94ce
fc90317 branchless dateFromEpoch MaxGraey Jul 9, 2026 https://github.com/AssemblyScript/assemblyscript/pull/3033/commits/fc90317564c4b33af5f0be368f4faeeeef6653ee
Clear filters https://github.com/AssemblyScript/assemblyscript/pull/3033/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
date.ts https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
date.debug.wat https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-df9ac5724d1c7730e58c745b4e252d43e4d88fc972bfcefacd3c1deb9788b321
date.release.wat https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-07e9a3a4baaa04cff43d8a604ab6b6ce8ba12ee50d73bffa59fc80a5f6c38667
date.ts https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-acdab9fd56ffe1804d9d8a29064ca941e3892b31922ab86406d75d8fbc4be56d
std/assembly/date.tshttps://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
View file https://github.com/MaxGraey/assemblyscript/blob/fc90317564c4b33af5f0be368f4faeeeef6653ee/std/assembly/date.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AssemblyScript/assemblyscript/pull/3033/{{ revealButtonHref }}
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
https://github.com/AssemblyScript/assemblyscript/pull/3033/files#diff-582211daa67f78e6ed1e01bc4f1ee745bf69e6c5cf22dfc469a059fcb485d702
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3033/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3033/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.