0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/benchmark/dgram
Anna Henningsen afdc3d0d18 dgram: use uv_udp_try_send()
This improves dgram performance by avoiding unnecessary async
operations.

One issue with this commit is that it seems hard to actually create
conditions under which the fallback path to the async case is
actually taken, for all supported OS, so an internal CLI option
is used for testing that path.

Another caveat is that the lack of an async operation means
that there are slight timing differences (essentially `nextTick()`
rather than `setImmediate()` for the send callback).

PR-URL: https://github.com/nodejs/node/pull/29832
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-10-05 17:48:10 -07:00
..
array-vs-concat.js dgram: use uv_udp_try_send() 2019-10-05 17:48:10 -07:00
bind-params.js
multi-buffer.js dgram: use uv_udp_try_send() 2019-10-05 17:48:10 -07:00
offset-length.js dgram: use uv_udp_try_send() 2019-10-05 17:48:10 -07:00
single-buffer.js dgram: use uv_udp_try_send() 2019-10-05 17:48:10 -07:00