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-10-01 11:50:51 +01:00
2015-10-07 13:27:46 -06:00
2015-10-07 13:27:46 -06:00
2015-10-07 13:27:46 -06:00
2015-05-28 21:48:44 +02:00
2015-05-28 21:48:44 +02:00
2015-10-01 13:56:25 -06:00
2015-06-16 23:26:29 +09:00
2015-09-06 21:38:05 +10:00
2015-02-11 23:06:29 +01:00
2015-10-07 13:27:46 -06:00
2015-08-26 12:45:16 -07:00
2015-10-22 13:57:28 -04:00
2015-09-17 15:25:14 -05:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-08 11:38:21 -06:00
2015-09-06 21:38:05 +10:00
2015-10-12 20:47:10 -07:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-20 23:14:01 -04:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-17 15:25:14 -05:00
2015-03-18 20:06:20 +01:00
2015-01-12 15:30:28 -08:00
2015-01-13 01:59:30 +01:00
2015-01-12 15:30:28 -08:00
2015-01-12 15:30:28 -08:00
2015-10-16 11:40:05 +09:00
2015-10-16 11:39:45 +09:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-08 19:25:47 +02:00
2015-09-06 21:38:05 +10:00
2015-10-14 12:16:18 -04:00
2015-09-06 21:38:05 +10:00
2015-01-12 15:30:28 -08:00
2015-06-02 21:44:18 +02:00
2015-09-16 12:48:25 -06:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-20 23:14:01 -04:00
2015-02-09 18:06:57 +01:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-01-12 15:30:28 -08:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-02-02 21:55:56 +01:00
2015-06-02 19:28:14 +02:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-06 16:19:55 -05:00
2015-09-06 21:38:05 +10:00
2015-10-20 23:14:01 -04:00
2015-10-20 23:14:01 -04:00
2015-10-20 23:14:01 -04:00
2015-02-03 22:37:42 +11:00
2015-01-12 15:30:28 -08:00
2015-02-02 21:55:56 +01:00
2015-01-12 15:30:28 -08:00
2015-01-12 15:30:28 -08:00
2015-08-20 01:14:37 -07:00
2015-10-20 23:13:58 -04:00
2015-10-22 13:57:28 -04:00
2012-02-03 14:07:32 +00:00
2015-09-06 21:38:05 +10:00
2015-10-22 13:57:28 -04:00
2015-02-02 21:55:56 +01:00
2015-02-09 18:06:57 +01:00
2015-02-02 21:55:56 +01:00
2012-11-21 01:21:53 +01:00
2015-10-01 13:54:44 -06:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-17 15:25:14 -05:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-06 07:02:20 +11:00
2015-09-06 21:38:05 +10:00
2015-10-06 07:02:21 +11:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-10-07 21:09:53 -07:00
2015-10-07 21:09:53 -07:00
2015-10-01 13:54:44 -06:00
2015-09-06 21:38:05 +10:00
2015-09-06 21:38:05 +10:00
2015-09-17 15:25:14 -05:00
2015-09-06 21:38:05 +10:00
2012-08-07 01:57:50 +02:00
2015-09-17 15:25:14 -05:00
2015-09-06 21:38:05 +10:00
2015-10-01 13:54:44 -06:00
2015-09-06 21:38:05 +10:00
2015-08-04 11:56:14 -07:00
2015-09-06 21:38:05 +10:00
2015-09-25 14:25:21 +02:00
2015-09-06 21:38:05 +10:00
2015-02-03 19:25:31 +03:00
2013-10-09 08:49:39 -07:00