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

Avoid copying arrays #154

Open
dannywillems opened this issue Sep 22, 2023 · 0 comments
Open

Avoid copying arrays #154

dannywillems opened this issue Sep 22, 2023 · 0 comments

Comments

@dannywillems
Copy link
Member

          Yes we could slightly optimize the code, but it comes at the cost that we have to always deal with the index translation by 1. This has led to bugs in the previous code base, so I'd like to keep it simple for now and always to the conversion to/from an ml array as a separate step.

In theory we could use array.unshift(0) at the end to get the same result without copying the array. The only reason I don't do that is because TS doesn't understand it

Originally posted by @mitschabaude in #140 (comment)

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