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 Array.Resize when growing ArrayInstance #1997

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Nov 4, 2024

No description provided.

@SebastianStehle
Copy link
Contributor

I am just curious. Is it that much faster than just using a list?

@lahma
Copy link
Collaborator Author

lahma commented Nov 4, 2024

I am just curious. Is it that much faster than just using a list?

Can you benchmark? 😉

@lahma lahma merged commit 7849416 into sebastienros:main Nov 4, 2024
3 checks passed
@lahma lahma deleted the array-resize branch November 4, 2024 16:03
@SebastianStehle
Copy link
Contributor

I am not questioning your decisions, you are doing a wonderful job here ;) ... I am pretty sure, there is a good reason to use an array.

@lahma
Copy link
Collaborator Author

lahma commented Nov 4, 2024

I am not questioning your decisions, you are doing a wonderful job here ;) ... I am pretty sure, there is a good reason to use an array.

Sure, no worries. I have wondered this myself as managing all manually is a real pain. But the thing is that List brings abstraction and all the checks it has inside of it during method calls, Jint already does a lot of checking and accounting for length so it would be just another (abstraction) layer slowing down. Probably some silly milliseconds, but it's there.

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

Successfully merging this pull request may close these issues.

2 participants