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

Use primitive numbers as keys instead of String objects in Wasm execution context HashMap #42

Open
gzurl opened this issue Mar 31, 2023 · 0 comments
Labels
🚀 enhancement New feature or request 👋 good first issue Good for newcomers

Comments

@gzurl
Copy link
Contributor

gzurl commented Mar 31, 2023

Is your feature request related to a problem? Please describe.

As part of PR #41, @ereslibre suggested this change: #41 (comment)

Describe the solution you'd like

Using primitive numbers instead of String objects will avoid all clone() operations needed right now. So it will use less memory and copy primitives will consume less CPU.

So far, we were using 8 hex chars, so 16^8 = 4.294.967.296 combinations. This is precisely the same that using a u32.

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request 👋 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant