René's URL Explorer Experiment


Title: Idea for x5 optimization for functions that return classes, objects or small arrays · Issue #997 · AssemblyScript/assemblyscript · GitHub

Open Graph Title: Idea for x5 optimization for functions that return classes, objects or small arrays · Issue #997 · AssemblyScript/assemblyscript

X Title: Idea for x5 optimization for functions that return classes, objects or small arrays · Issue #997 · AssemblyScript/assemblyscript

Description: I noticed that when we create a functions that return Class, Objects or small Array performance become worse than in JS. I was curious why this happens and created a new version of my code and get x7 boost in performance for f64 struct. ...

Open Graph Description: I noticed that when we create a functions that return Class, Objects or small Array performance become worse than in JS. I was curious why this happens and created a new version of my code and get ...

X Description: I noticed that when we create a functions that return Class, Objects or small Array performance become worse than in JS. I was curious why this happens and created a new version of my code and get ...

Opengraph URL: https://github.com/AssemblyScript/assemblyscript/issues/997

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Idea for x5 optimization for functions that return classes, objects or small arrays","articleBody":"I noticed that when we create a functions that return Class, Objects or small Array performance become worse than in JS. I was curious why this happens and created a new version of my code and get x7 boost in performance for f64 struct. It can be little bit optimistic because I have too simple structure.\r\n\r\nThe idea:\r\n\r\nWhen you compile a code it often allocated objects with the same Shapes. It can be a Points, some Tuples or general Objects. All is ok when you create it once or twice in your code, but it can be huge problem when you run this code in loop.\r\n\r\nSo we can allocate only once a relatively big Turing tape with this objects. And when we invoke a function that return objects with this shapes, we can pass a new index from tape in which we can store result object.\r\n\r\nAlso we can notice that we can reuse space in this tape for different function scopes. Here a lot of room for your imagination how to do this. For example all methods in one class can have only one temporary cache and another cache for another functions.\r\n\r\nSource code:\r\n[before](https://pastebin.com/h3eVzdub), [after](https://github.com/munrocket/double.js/blob/master/wasm/mandel.ts)\r\n\r\nPicture with [results](https://munrocket.github.io/double.js/docs/benchmark.html):\r\n\r\n![](https://habrastorage.org/webt/7j/-d/fx/7j-dfxi1rn1t6foh-usnemqm4x0.png)","author":{"url":"https://github.com/munrocket","@type":"Person","name":"munrocket"},"datePublished":"2019-12-07T18:28:04Z","url":"https://github.com/AssemblyScript/assemblyscript/issues/997"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1c80e79d-0b8f-18f9-664e-bf32a3eb9441
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEA44:2EC689:2CB6403:3D100F6:6B005C8D
html-safe-nonce838a9619147ee1e39c18069c7598014ab9b84660f46e3fb2ecd37c67d76b982f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTQ0OjJFQzY4OToyQ0I2NDAzOjNEMTAwRjY6NkIwMDVDOEQiLCJ2aXNpdG9yX2lkIjoiMzcyNDMzODg0MDQ5Njc5MDY2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7ab3bfe3fcde5ca0193366ba1e3c6395f86961ec4cb826d2ff462d1a88ab2c41
hovercard-subject-tagissue:534435400
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/AssemblyScript/assemblyscript/997/issue_layout
twitter:imagehttps://opengraph.githubassets.com/56895a510e26d979ce233e31efc84fc0c03105c0b2f940555587c958b303114f/AssemblyScript/assemblyscript/issues/997
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/56895a510e26d979ce233e31efc84fc0c03105c0b2f940555587c958b303114f/AssemblyScript/assemblyscript/issues/997
og:image:altI noticed that when we create a functions that return Class, Objects or small Array performance become worse than in JS. I was curious why this happens and created a new version of my code and get ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemunrocket
hostnamegithub.com
expected-hostnamegithub.com
None29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseeacd927ba6112e3b01ba99c762bd699a4a4f5df7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/AssemblyScript/assemblyscript/issues/997#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAssemblyScript%2Fassemblyscript%2Fissues%2F997
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%2Fissues%2F997
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=AssemblyScript%2Fassemblyscript
Reloadhttps://github.com/AssemblyScript/assemblyscript/issues/997
Reloadhttps://github.com/AssemblyScript/assemblyscript/issues/997
Reloadhttps://github.com/AssemblyScript/assemblyscript/issues/997
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
https://github.com/AssemblyScript/assemblyscript
New issuehttps://github.com/login?return_to=https://github.com/AssemblyScript/assemblyscript/issues/997
New issuehttps://github.com/login?return_to=https://github.com/AssemblyScript/assemblyscript/issues/997
Idea for x5 optimization for functions that return classes, objects or small arrayshttps://github.com/AssemblyScript/assemblyscript/issues/997#top
stalehttps://github.com/AssemblyScript/assemblyscript/issues?q=state%3Aopen%20label%3A%22stale%22
https://github.com/munrocket
munrockethttps://github.com/munrocket
on Dec 7, 2019https://github.com/AssemblyScript/assemblyscript/issues/997#issue-534435400
beforehttps://pastebin.com/h3eVzdub
afterhttps://github.com/munrocket/double.js/blob/master/wasm/mandel.ts
resultshttps://munrocket.github.io/double.js/docs/benchmark.html
https://camo.githubusercontent.com/31b122eaa6a3355a053be5d641bdca7595de8c56f8d29bbe3528fda1e795ebd5/68747470733a2f2f686162726173746f726167652e6f72672f776562742f376a2f2d642f66782f376a2d6466786931726e317436666f682d75736e656d716d3478302e706e67
https://github.com/MaxGraey
MaxGraeyhttps://github.com/MaxGraey
on Dec 7, 2019https://github.com/AssemblyScript/assemblyscript/issues/997#issuecomment-562875646
scalar replacementhttps://en.wikipedia.org/wiki/Escape_analysis#Optimizations
https://github.com/MaxGraey
MaxGraeyhttps://github.com/MaxGraey
on Dec 7, 2019https://github.com/AssemblyScript/assemblyscript/issues/997#issuecomment-562875700
https://github.com/munrocket
munrockethttps://github.com/munrocket
on Dec 9, 2019https://github.com/AssemblyScript/assemblyscript/issues/997#issuecomment-563228760
https://camo.githubusercontent.com/30a23b93dbbe04f86662997894f950423cf72f8def142cbd3c153b17ec99e314/68747470733a2f2f686162726173746f726167652e6f72672f776562742f6d652f39382f69792f6d65393869796b626c6637713464737639676c74776d633235376d2e706e67
munrockethttps://github.com/munrocket
on Dec 9, 2019https://github.com/AssemblyScript/assemblyscript/issues/997#event-2866227022
https://github.com/munrocket
munrockethttps://github.com/munrocket
on Dec 14, 2019https://github.com/AssemblyScript/assemblyscript/issues/997#issuecomment-565758811
Platform-independent Just-in-Time (JIT) compilationhttps://github.com/WebAssembly/design/blob/4c6cad51e082675774ed9ea28c7129c293a2445f/FutureFeatures.md#platform-independent-just-in-time-jit-compilation
https://github.com/apps/stale
stalehttps://github.com/apps/stale
on Jan 26, 2020https://github.com/AssemblyScript/assemblyscript/issues/997#issuecomment-578540199
stalehttps://github.com/apps/stale
stalehttps://github.com/AssemblyScript/assemblyscript/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 26, 2020https://github.com/AssemblyScript/assemblyscript/issues/997#event-2980153821
stalehttps://github.com/apps/stale
completedhttps://github.com/AssemblyScript/assemblyscript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 2, 2020https://github.com/AssemblyScript/assemblyscript/issues/997#event-3000295675
Sign up for freehttps://github.com/signup?return_to=https://github.com/AssemblyScript/assemblyscript/issues/997
Sign in to commenthttps://github.com/login?return_to=https://github.com/AssemblyScript/assemblyscript/issues/997
stalehttps://github.com/AssemblyScript/assemblyscript/issues?q=state%3Aopen%20label%3A%22stale%22
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.