Files
node/src
Trevor Norris ae196175f4 node: improve GetActiveRequests performance
v8 is faster at setting object properties in JS than C++. Even when it
requires calling into JS from native code. Make
process._getActiveRequests() faster by doing this when populating the
array containing request objects.

Simple benchmark:

    for (let i = 0; i < 22; i++)
      fs.open(__filename, 'r', function() { });
    let t = process.hrtime();
    for (let i = 0; i < 1e6; i++)
      process._getActiveRequests();
    t = process.hrtime(t);
    console.log((t[0] * 1e9 + t[1]) / 1e6);

Results between the two:

    Previous:  4406 ns/op
    Patched:    690 ns/op     5.4x faster

PR-URL: https://github.com/nodejs/node/pull/3375
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
2015-10-22 13:57:28 -04:00
..
2015-08-26 12:45:16 -07:00
2015-09-17 15:25:14 -05:00
2015-09-17 15:25:14 -05:00
2015-10-06 16:19:55 -05:00
2015-08-20 01:14:37 -07:00
2012-02-03 14:07:32 +00:00
2015-02-02 21:55:56 +01:00
2015-09-17 15:25:14 -05:00
2015-09-17 15:25:14 -05:00
2015-09-17 15:25:14 -05:00
2015-08-04 11:56:14 -07:00
2015-09-25 14:25:21 +02:00