Files
node/test/parallel
Trevor Norris 494227bb03 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-21 16:57:05 -06:00
..
2015-05-19 21:21:27 +02:00
2015-05-19 21:21:27 +02:00
2015-08-20 20:16:47 +02:00
2015-05-19 21:21:27 +02:00
2015-05-19 21:21:27 +02:00
2015-05-19 21:21:27 +02:00
2015-05-19 21:21:27 +02:00
2015-05-19 21:21:27 +02:00
2015-06-05 22:58:14 -04:00
2015-06-05 22:58:14 -04:00
2015-05-19 21:21:27 +02:00
2015-10-09 14:45:47 -07:00
2015-05-19 21:21:27 +02:00
2015-08-23 17:59:43 -04:00
2015-08-04 11:56:11 -07:00
2015-06-15 16:37:37 +02:00