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

Update bool type to use 1 byte in memory #130

Open
obycode opened this issue Oct 19, 2023 · 1 comment
Open

Update bool type to use 1 byte in memory #130

obycode opened this issue Oct 19, 2023 · 1 comment
Assignees

Comments

@obycode
Copy link
Collaborator

obycode commented Oct 19, 2023

The bool is represented on the stack as an i32 simply because that is an easy type to work with. When it is written to memory, I defaulted to writing the full i32 because that seemed like the easiest solution. After writing more code, I see that it is also very easy to handle reading/writing a single byte for the bool, and save some space in the memory. I don't think this improves performance at all, just data size, so it is not urgent.

@obycode
Copy link
Collaborator Author

obycode commented Oct 19, 2023

Similarly for the indicators of optional and response types.

@obycode obycode moved this from Status: 🆕 New to Status: 📋 Backlog in Stacks Core Eng Oct 23, 2023
@smcclellan smcclellan modified the milestones: WASM Phase 2, WASM Phase 3 Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 📋 Backlog
Development

No branches or pull requests

3 participants