mirror of
https://github.com/nodejs/node.git
synced 2026-11-15 10:36:53 -05:00
Restore the Buffer.isBuffer() check to avoid unnecessary Buffer.from() calls when the input is already a Buffer. This improves performance by 30-50% for buffer-heavy UDP operations. Includes benchmark test for fixBufferList function to verify the performance improvements across different data types and chunk sizes. PR-URL: https://github.com/nodejs/node/pull/59934 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>