Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document dynamic memory allocator trade-offs #24

Open
HCastano opened this issue Jul 16, 2021 · 4 comments
Open

Document dynamic memory allocator trade-offs #24

HCastano opened this issue Jul 16, 2021 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@HCastano
Copy link
Contributor

After use-ink/ink#831 is merged there will be two choices for dynamic memory allocators in ink!. The default is the new bump allocator while the other choice is wee_alloc (which used to be the old default).

The fundamental tradeoff here is .wasm size vs. efficient use of memory.

For someone concerned with running smart contracts on a parachain, size would be the most important consideration. However, if someone is running a standalone chain then memory efficiency might be more important.

The guide should explain:

  • The role of a dynamic memory allocator
  • The different allocators available
  • The trade-offs between the allocators
  • How to switch between allocators
@HCastano HCastano added the documentation Improvements or additions to documentation label Jul 16, 2021
@SkymanOne
Copy link
Contributor

Do we still allow choosing an allocator?

@HCastano
Copy link
Contributor Author

Yes we do.

I have a recent PR around this: use-ink/ink#1661.

If we want to add a section around this in the ink-docs it can basically be a copy-paste of the documentation I wrote in that PR.

@SkymanOne
Copy link
Contributor

Yes. Can you please add it to the docs?

@HCastano
Copy link
Contributor Author

No promises on the timelines though

@HCastano HCastano self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants