Skip to content

Severe performance regression with object spread operator introduced in v12.18.1 and v14.5.0 #34322

@uwinkelvos

Description

@uwinkelvos
  • Version: v12.18.1, v12.18.2, v14.5.0
  • Platform: Linux lalala-nb 5.7.7-arch1-1 deps: update openssl to 1.0.1j #1 SMP PREEMPT Wed, 01 Jul 2020 14:53:16 +0000 x86_64 GNU/Linux
  • Subsystem: v8

What steps will reproduce the bug?

When using the object spread operator to "join" two objects, the performance has decreased by ~ factor 20. This only happens with objects that have at least 50 keys and the keys of the first one need to be non trivial.

see:
https://github.com/uwinkelvos/node_object-spread_preformance-regression

If i had to guess it's related to:
af95bd7#diff-ff06109b32824fc20fec697f584a42e3

How often does it reproduce? Is there a required condition?

Always reproducible on aforementioned platforms.

What is the expected behavior?

performance level like 12.18.0

What do you see instead?

factor 20 performance loss.

Additional information

https://bugs.chromium.org/p/v8/issues/detail?id=10763

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceIssues and PRs related to the performance of Node.js.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions