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

Don't use NaN boxing within capabilities. #3

Open
jacobbramley opened this issue Oct 31, 2022 · 0 comments
Open

Don't use NaN boxing within capabilities. #3

jacobbramley opened this issue Oct 31, 2022 · 0 comments

Comments

@jacobbramley
Copy link
Collaborator

With JSVALUE64 (i.e. 64-bit platforms), JSValue boxes integers, pointers, doubles and a handful of special values using the NaN space. This requires adding or subtracting 2^49 to the encoded double to put things in convenient ranges.

I don't know what the overheads of boxing actually are, but when JSValue holds a capability, this boxing should be unnecessary. We should investigate adding a JSVALUECAP or similar, and implementing a simpler scheme. This would allow a more realistic performance comparison with purecap mode.

Note that this could be quite a big (if not difficult) task; the JSVALUE32_64-or-JSVALUE64 assumption is widespread, and probably also affects JIT code.

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