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

Improve flatten perf #4361

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Improve flatten perf #4361

merged 1 commit into from
Mar 9, 2020

Conversation

Pessimistress
Copy link
Collaborator

Before:

  • Array of 10,000 items: 18.3K iterations/s ±4.33%
  • Array of 1,000 nested items (max depth = 10): 25.2K iterations/s ±2.64%

After:

  • Array of 10,000 items: 23.7K iterations/s ±8.20%
  • Array of 1,000 nested items (max depth = 10): 34.9K iterations/s ±4.09%

Array.flat(Infinity):

  • Array of 10,000 items: 608 iterations/s ±3.79%
  • Array of 1,000 nested items (max depth = 10): 1.22K iterations/s ±1.59%

Change List

  • Private flatten utility API

@Pessimistress Pessimistress requested a review from tsherif March 7, 2020 19:20
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 80.378% when pulling 5b0ace9 on x/flatten into 181dc2a on master.

Copy link
Contributor

@tsherif tsherif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is hilarious/awesome.

@Pessimistress Pessimistress merged commit 9e7977d into master Mar 9, 2020
@Pessimistress Pessimistress deleted the x/flatten branch March 11, 2020 16:49
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.

3 participants