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

optimize array growth using over-allocation #671

Closed
dckc opened this issue Jul 22, 2021 · 1 comment
Closed

optimize array growth using over-allocation #671

dckc opened this issue Jul 22, 2021 · 1 comment

Comments

@dckc
Copy link
Contributor

dckc commented Jul 22, 2021

Describe

We have identified a requirement for a build-time option to over-allocate arrays by, say, 30%, to avoid quadratic performance from things like Array.push() in a loop.

This is a high priority request. Also tracked as Agoric/agoric-sdk#3012

Why do you think this feature would be useful?
Our customers will most likely expect Array.push() to have similar performance to other engines that have this optimization.

array growth is a spreadsheet with some performance measurements (from @dtribble Fri, Jun 11, 1:05 PM KC time).

Describe alternatives you've considered
not many... just doing nothing, I suppose.

cc @phoddie @kriskowal

@dckc
Copy link
Contributor Author

dckc commented Jul 23, 2021

@dtribble I guess we'll track this elsewhere.

@phoddie feel free to delete this.

@dckc dckc closed this as completed Jul 23, 2021
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