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

buffer.length performance regressed in 6.5.0 #9006

Closed
Nibbler999 opened this issue Oct 10, 2016 · 9 comments
Closed

buffer.length performance regressed in 6.5.0 #9006

Nibbler999 opened this issue Oct 10, 2016 · 9 comments
Labels
performance Issues and PRs related to the performance of Node.js. v8 engine Issues and PRs related to the V8 dependency.

Comments

@Nibbler999
Copy link
Contributor

  • Version: v6.7.0
  • Platform: Linux x86_64
  • Subsystem: Buffer
[nibbler@nibbler ~]$ cat buffer.js 
'use strict';

var data = new Buffer(1024);

console.time('test');

for (var i = 0; i < 1000000; i++) {
    for (var j = 0; j < data.length; j++) {

    }
}

console.timeEnd('test');

[nibbler@nibbler ~]$ ~/Downloads/node-v6.4.0-linux-x64/bin/node buffer.js 
test: 623.471ms
[nibbler@nibbler ~]$ ~/Downloads/node-v6.5.0-linux-x64/bin/node buffer.js 
test: 2837.938ms
@addaleax addaleax added buffer Issues and PRs related to the buffer subsystem. performance Issues and PRs related to the performance of Node.js. labels Oct 10, 2016
@mscdex
Copy link
Contributor

mscdex commented Oct 10, 2016

I think about the only change that would have affected that was the V8 5.0->5.1 upgrade.

EDIT: FWIW v6.4.0 and master have the same results, but I can confirm that v6.5.0 is a little over twice as slow when running that test.

@addaleax addaleax added the v8 engine Issues and PRs related to the V8 dependency. label Oct 10, 2016
@mscdex
Copy link
Contributor

mscdex commented Oct 10, 2016

/cc @nodejs/v8 ?

@targos targos self-assigned this Oct 10, 2016
@targos
Copy link
Member

targos commented Oct 10, 2016

I think the fix would be v8/v8@3c927e0 but the diff is huge.

@jeisinger
Copy link
Contributor

@bmeurer

@bmeurer
Copy link
Member

bmeurer commented Oct 11, 2016

Yeah, I guess it would be fixed by v8/v8@3c927e0.

@apapirovski
Copy link
Member

ping @targos @bmeurer — do you know if this was ever addressed in v6.x?

@addaleax addaleax added the v6.x label Oct 19, 2017
@addaleax
Copy link
Member

@apapirovski I can reproduce this using the latest v6.x release (6.11.4), so I’d assume “no”. It might be something we’d just have to accept as a wontfix if nobody thinks they can put in the work to fix it?

@addaleax addaleax removed the buffer Issues and PRs related to the buffer subsystem. label Oct 19, 2017
@bmeurer
Copy link
Member

bmeurer commented Oct 19, 2017

This was never addressed for v6.x, no. Not sure it's worth spending time on this, esp. since this code is fairly different in V8 nowadays.

@apapirovski
Copy link
Member

Given the feedback last time and the lack of any movement, I'm going to go ahead and close. If anyone feels like they want to take it on or this is an important issue, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues and PRs related to the performance of Node.js. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

7 participants