Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

micro-optimization: avoid Object.keys() #17

Open
Raynos opened this issue Oct 6, 2016 · 0 comments
Open

micro-optimization: avoid Object.keys() #17

Raynos opened this issue Oct 6, 2016 · 0 comments

Comments

@Raynos
Copy link
Collaborator

Raynos commented Oct 6, 2016

Refactor https://github.com/uber/lb_pool/blob/master/pool_endpoint.js#L152
Into an for (var key in obj) { loop.

This avoids allocating keys. About 2.5% of the CPU for rtapi is spend in this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant