Title: feat: Add `memory.dataUTF8()` built-in function by geraintluff · Pull Request #2974 · AssemblyScript/assemblyscript · GitHub
Open Graph Title: feat: Add `memory.dataUTF8()` built-in function by geraintluff · Pull Request #2974 · AssemblyScript/assemblyscript
X Title: feat: Add `memory.dataUTF8()` built-in function by geraintluff · Pull Request #2974 · AssemblyScript/assemblyscript
Description: Implements #2972, providing a way to embed UTF-8 string constants.
Rationale
UTF-16 strings are naturally embedded in the data section if you use a string constant ("...") in your code.
If what you need is a UTF-8 string, then storing as WTF-16 wastes binary space and execution time.
Current workaround
You can currently achieve the same result by using memory.data
Open Graph Description: Implements #2972, providing a way to embed UTF-8 string constants. Rationale UTF-16 strings are naturally embedded in the data section if you use a string constant ("...") in your code. I...
X Description: Implements #2972, providing a way to embed UTF-8 string constants. Rationale UTF-16 strings are naturally embedded in the data section if you use a string constant ("...") in your...
Opengraph URL: https://github.com/AssemblyScript/assemblyscript/pull/2974
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bef0f0fe-42b3-0437-568f-740e3ff7317a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA48:2A7919:14C78F0:1C3A6B7:696EA401 |
| html-safe-nonce | 9341996692ff4e9e82daa31071733d874120684b460a24787f670dbc3bb27f2f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTQ4OjJBNzkxOToxNEM3OEYwOjFDM0E2Qjc6Njk2RUE0MDEiLCJ2aXNpdG9yX2lkIjoiOTE4NDQ4OTkxODczNjI3ODUyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f443f77fb8444d3c1486587d3b3f9268bcfc08b60e8d4bfb0fd3b8074256145c |
| hovercard-subject-tag | pull_request:3169548297 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/AssemblyScript/assemblyscript/pull/2974/files |
| twitter:image | https://avatars.githubusercontent.com/u/1957191?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1957191?s=400&v=4 |
| og:image:alt | Implements #2972, providing a way to embed UTF-8 string constants. Rationale UTF-16 strings are naturally embedded in the data section if you use a string constant ("...") in your code. I... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/AssemblyScript/assemblyscript git https://github.com/AssemblyScript/assemblyscript.git |
| octolytics-dimension-user_id | 28916798 |
| octolytics-dimension-user_login | AssemblyScript |
| octolytics-dimension-repository_id | 105138356 |
| octolytics-dimension-repository_nwo | AssemblyScript/assemblyscript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 105138356 |
| octolytics-dimension-repository_network_root_nwo | AssemblyScript/assemblyscript |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width