Code Monkey home page Code Monkey logo

Comments (7)

climba03003 avatar climba03003 commented on May 19, 2024 1

Maybe related to #51360

from node.

RedYetiDev avatar RedYetiDev commented on May 19, 2024

@nodejs/performance

from node.

lemire avatar lemire commented on May 19, 2024

@FishOrBear What are you running this on? Your numbers appear to be very, very high.

I do not see a regression. What I see on this test is that Node 20 had much better performance on this particular test, but it went away soon after.

Here are my results on a macbook...

Bun

[12.89ms] j
[8.05ms] j
[7.32ms] j
[6.83ms] j
[6.37ms] j
[5.95ms] j
[5.77ms] j
[5.52ms] j
[5.34ms] j
[5.16ms] j
[5.07ms] j
[4.90ms] j
[4.87ms] j
[4.79ms] j
[4.99ms] j
[4.76ms] j
[4.69ms] j
[4.81ms] j
[4.73ms] j
[4.70ms] j

Node 22

 node issue.js
j: 6.7ms
j: 4.991ms
j: 4.909ms
j: 4.694ms
j: 4.692ms
j: 4.47ms
j: 4.477ms
j: 4.377ms
j: 4.249ms
j: 4.314ms
j: 4.551ms
j: 4.311ms
j: 4.288ms
j: 4.378ms
j: 4.418ms
j: 4.246ms
j: 4.281ms
j: 4.372ms
j: 4.384ms
j: 4.248ms

Node 21...

node issue.js
j: 7.221ms
j: 5.245ms
j: 5.057ms
j: 5.02ms
j: 4.848ms
j: 4.645ms
j: 4.684ms
j: 4.57ms
j: 4.436ms
j: 4.489ms
j: 4.638ms
j: 4.475ms
j: 4.467ms
j: 4.599ms
j: 4.578ms
j: 4.405ms
j: 4.418ms
j: 4.651ms
j: 4.483ms
j: 4.405ms

Node 20

j: 9.254ms
j: 6.872ms
j: 4.039ms
j: 3.949ms
j: 3.861ms
j: 3.748ms
j: 3.727ms
j: 3.618ms
j: 3.599ms
j: 3.925ms
j: 3.544ms
j: 3.425ms
j: 3.521ms
j: 3.56ms
j: 3.522ms
j: 3.422ms
j: 3.47ms
j: 3.589ms
j: 3.559ms
j: 3.476ms

Node 19

j: 7.636ms
j: 5.37ms
j: 5.496ms
j: 5.431ms
j: 5.442ms
j: 4.993ms
j: 5.244ms
j: 4.796ms
j: 4.836ms
j: 4.578ms
j: 4.475ms
j: 4.59ms
j: 4.716ms
j: 4.499ms
j: 4.592ms
j: 4.571ms
j: 4.588ms
j: 4.454ms
j: 4.547ms
j: 4.9ms

Node 18

  node issue.js
j: 10.643ms
j: 6.794ms
j: 6.516ms
j: 6.421ms
j: 6.46ms
j: 4.704ms
j: 4.814ms
j: 4.631ms
j: 4.505ms
j: 4.637ms
j: 4.8ms
j: 4.584ms
j: 4.518ms
j: 4.754ms
j: 4.645ms
j: 4.492ms
j: 4.605ms
j: 4.763ms
j: 4.568ms
j: 4.51ms

Node 17

j: 9.578ms
j: 6.67ms
j: 6.423ms
j: 6.232ms
j: 6.258ms
j: 6.004ms
j: 4.501ms
j: 4.758ms
j: 4.603ms
j: 4.539ms
j: 4.605ms
j: 4.793ms
j: 4.521ms
j: 4.512ms
j: 4.73ms
j: 4.598ms
j: 4.524ms
j: 4.571ms
j: 4.682ms
j: 4.56ms

Node 16

j: 7.864ms
j: 5.231ms
j: 5.038ms
j: 4.87ms
j: 4.777ms
j: 4.594ms
j: 4.698ms
j: 4.709ms
j: 4.546ms
j: 4.444ms
j: 4.498ms
j: 4.701ms
j: 4.53ms
j: 4.7ms
j: 4.635ms
j: 4.676ms
j: 4.427ms
j: 4.504ms
j: 4.68ms
j: 4.429ms

Node 10

j: 14.909ms
j: 5.316ms
j: 4.624ms
j: 4.854ms
j: 4.679ms
j: 6.734ms
j: 5.198ms
j: 5.218ms
j: 5.150ms
j: 5.224ms
j: 4.984ms
j: 5.020ms
j: 5.276ms
j: 4.999ms
j: 5.492ms
j: 5.013ms
j: 5.031ms
j: 5.218ms
j: 5.084ms
j: 4.990ms

I think we need more tests to verify the issue.

cc @RafaelGSS @anonrig

from node.

mcollina avatar mcollina commented on May 19, 2024

Unless there is something specific about buffers, this has nothing to do with Node.js, but it's rather a V8 change.

from node.

FishOrBear avatar FishOrBear commented on May 19, 2024

@FishOrBear What are you running this on? Your numbers appear to be very, very high.

I do not see a regression. What I see on this test is that Node 20 had much better performance on this particular test, but it went away soon after.

Here are my results on a macbook...

Bun

[12.89ms] j
[8.05ms] j
[7.32ms] j
[6.83ms] j
[6.37ms] j
[5.95ms] j
[5.77ms] j
[5.52ms] j
[5.34ms] j
[5.16ms] j
[5.07ms] j
[4.90ms] j
[4.87ms] j
[4.79ms] j
[4.99ms] j
[4.76ms] j
[4.69ms] j
[4.81ms] j
[4.73ms] j
[4.70ms] j

Node 22

 node issue.js
j: 6.7ms
j: 4.991ms
j: 4.909ms
j: 4.694ms
j: 4.692ms
j: 4.47ms
j: 4.477ms
j: 4.377ms
j: 4.249ms
j: 4.314ms
j: 4.551ms
j: 4.311ms
j: 4.288ms
j: 4.378ms
j: 4.418ms
j: 4.246ms
j: 4.281ms
j: 4.372ms
j: 4.384ms
j: 4.248ms

Node 21...

node issue.js
j: 7.221ms
j: 5.245ms
j: 5.057ms
j: 5.02ms
j: 4.848ms
j: 4.645ms
j: 4.684ms
j: 4.57ms
j: 4.436ms
j: 4.489ms
j: 4.638ms
j: 4.475ms
j: 4.467ms
j: 4.599ms
j: 4.578ms
j: 4.405ms
j: 4.418ms
j: 4.651ms
j: 4.483ms
j: 4.405ms

Node 20

j: 9.254ms
j: 6.872ms
j: 4.039ms
j: 3.949ms
j: 3.861ms
j: 3.748ms
j: 3.727ms
j: 3.618ms
j: 3.599ms
j: 3.925ms
j: 3.544ms
j: 3.425ms
j: 3.521ms
j: 3.56ms
j: 3.522ms
j: 3.422ms
j: 3.47ms
j: 3.589ms
j: 3.559ms
j: 3.476ms

Node 19

j: 7.636ms
j: 5.37ms
j: 5.496ms
j: 5.431ms
j: 5.442ms
j: 4.993ms
j: 5.244ms
j: 4.796ms
j: 4.836ms
j: 4.578ms
j: 4.475ms
j: 4.59ms
j: 4.716ms
j: 4.499ms
j: 4.592ms
j: 4.571ms
j: 4.588ms
j: 4.454ms
j: 4.547ms
j: 4.9ms

Node 18

  node issue.js
j: 10.643ms
j: 6.794ms
j: 6.516ms
j: 6.421ms
j: 6.46ms
j: 4.704ms
j: 4.814ms
j: 4.631ms
j: 4.505ms
j: 4.637ms
j: 4.8ms
j: 4.584ms
j: 4.518ms
j: 4.754ms
j: 4.645ms
j: 4.492ms
j: 4.605ms
j: 4.763ms
j: 4.568ms
j: 4.51ms

Node 17

j: 9.578ms
j: 6.67ms
j: 6.423ms
j: 6.232ms
j: 6.258ms
j: 6.004ms
j: 4.501ms
j: 4.758ms
j: 4.603ms
j: 4.539ms
j: 4.605ms
j: 4.793ms
j: 4.521ms
j: 4.512ms
j: 4.73ms
j: 4.598ms
j: 4.524ms
j: 4.571ms
j: 4.682ms
j: 4.56ms

Node 16

j: 7.864ms
j: 5.231ms
j: 5.038ms
j: 4.87ms
j: 4.777ms
j: 4.594ms
j: 4.698ms
j: 4.709ms
j: 4.546ms
j: 4.444ms
j: 4.498ms
j: 4.701ms
j: 4.53ms
j: 4.7ms
j: 4.635ms
j: 4.676ms
j: 4.427ms
j: 4.504ms
j: 4.68ms
j: 4.429ms

Node 10

j: 14.909ms
j: 5.316ms
j: 4.624ms
j: 4.854ms
j: 4.679ms
j: 6.734ms
j: 5.198ms
j: 5.218ms
j: 5.150ms
j: 5.224ms
j: 4.984ms
j: 5.020ms
j: 5.276ms
j: 4.999ms
j: 5.492ms
j: 5.013ms
j: 5.031ms
j: 5.218ms
j: 5.084ms
j: 4.990ms

I think we need more tests to verify the issue.

cc @RafaelGSS @anonrig

I'm running it on an older cpu and your macbook performs well.
cpu:Intel(R) Celeron(R) CPU J3455 @ 1.50GHz

from node.

lemire avatar lemire commented on May 19, 2024

The JavaScript engine v8 was updated to 11.3 with Node 20, it was upgraded again to 11.8 with Node 20. Node 19 had v8 10.7.

Regarding the possibility that it could be #51360... maglev was introduced in Node 22, but you see a performance difference between Node 20 and Node 21. So my numbers do not point at a regression caused by maglev.

from node.

joyeecheung avatar joyeecheung commented on May 19, 2024

Unless there is something specific about buffers, this has nothing to do with Node.js, but it's rather a V8 change.

Buffers are just Uint8Arrays now, so if this reproduces with Uint8Array, this is more likely an V8 issue (especially if it reproduces with different versions of d8)

from node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.