0

If I understood correctly, every number in javascript is 64-bit (i64)?

Does that mean that new Uint8Array([num]) uses less memory than just num?

2
  • The memory for num may be less, but you also have to factor in the memory used for the array header. Commented Sep 22, 2022 at 21:44
  • But Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]) should use less memory than [1, 2, 3, 4, 5, 6, 7, 8] because the header overhead is amortized. Commented Sep 22, 2022 at 21:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.