Skip to content

Promise performance drop between v8 7.4 and 7.5 #33384

@Aschen

Description

@Aschen

I was doing some benchmark about promises performances and I noticed a performance drop in traditional promises (then/catch) between Node.js 10 and Node.js 12.

With further investigation I'm now able to say that the performance drop occur between v8 7.4 (Node.js 12.0.0) and v8 7.5 (Node.js 12.5.0).

The performance drop is still present in recent version of v8 (tested with v8 8.1 on Node.js 14.2.0)

Promises are between 3x and 5x slower in v8 7.5 than in v8 7.4 and they are still 2x slower in v8 8.1

Do you have any idea why?

image

If we look at the bigger picture, we can see that promise performance were much more better at some point (Node.js 10) and then start to deteriorate

image

You can run the script present on this Gist to reproduce the benchmarks: https://gist.github.com/Aschen/1d35ccb6dc1dc3d6796b00cecfebb6d0

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceIssues and PRs related to the performance of Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions