diff options
author | Brian White <mscdex@mscdex.net> | 2020-06-13 20:35:16 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-17 22:12:49 +0300 |
commit | a4f3206b767bee8ef3e0e1dc8bdbd5e477c5bfa6 (patch) | |
tree | b96e38c56b4a5c4b32904395229ea62dcd532627 /benchmark | |
parent | 272b46e04d73f72e918c4be4aea0fb7cb90254e2 (diff) |
events: improve listeners() performance
PR-URL: https://github.com/nodejs/node/pull/33863
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/events/ee-listeners.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/events/ee-listeners.js b/benchmark/events/ee-listeners.js index 08631e95e21..9de8d04a175 100644 --- a/benchmark/events/ee-listeners.js +++ b/benchmark/events/ee-listeners.js @@ -14,7 +14,7 @@ function main({ n, listeners, raw }) { for (let k = 0; k < listeners; k += 1) { ee.on('dummy0', () => {}); - ee.on('dummy1', () => {}); + ee.once('dummy1', () => {}); } if (raw === 'true') { |