Skip to content

Conversation

@danielsan
Copy link

No description provided.


bench('fixed size fill(a,b,c)', total, () => {
const array = new Array(total)
for (let i = 0; i < total; i++) array.fill(i, i, i+1)
Copy link
Owner

Choose a reason for hiding this comment

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

Why do we expect this bench to be different from the first one?

for (let i = 0; i < total; i++) array[i] = i
})

bench('fixedArray[i] = i DESC', total, () => {
Copy link
Owner

Choose a reason for hiding this comment

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

Same question. Is it expected to be slow than ASC?

})

bench('Array.fill', total, () => {
const array = Array.from(total).fill('test')
Copy link
Owner

Choose a reason for hiding this comment

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

This concat two operations. I don't think we should include it

danielsan and others added 4 commits June 6, 2023 16:02
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
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