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

JSString should not contain StringSpan #96

Closed
ackava opened this issue Nov 8, 2023 · 0 comments
Closed

JSString should not contain StringSpan #96

ackava opened this issue Nov 8, 2023 · 0 comments
Assignees

Comments

@ackava
Copy link
Contributor

ackava commented Nov 8, 2023

We need to decide whether JSString should hold StringSpan or String.

  1. StringSpan causes lot of reallocation as every .ToString will cause new string allocation, instead of reusing whole string.
  2. Only function's source code is useful as StringSpan, as in JavaScript, we are not actually accessing source code anywhere in the script.
  3. Function's toString should allocate string from original StringSpan and reuse it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant