buffer.length performance regressed in 6.5.0 #9006

Open
Nibbler999 opened this Issue Oct 10, 2016 · 5 comments

Projects

None yet

6 participants

@Nibbler999
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
@mscdex
Contributor
mscdex commented Oct 10, 2016 edited

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 label Oct 10, 2016
@mscdex
Contributor
mscdex commented Oct 10, 2016

/cc @nodejs/v8 ?

@targos targos self-assigned this Oct 10, 2016
@targos
Member
targos commented Oct 10, 2016

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

@jeisinger
Member
@bmeurer
Contributor
bmeurer commented Oct 11, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment