Files
node/lib
alejandro 51587b2202 buffer: preallocate array with buffer length
Because the final array length is known, it's better to allocate its
final length at initialization time to avoid future reallocations.

Also add an explicit buffer length greater than 0 comparison so
it's more readable, avoids the internal ToBoolean call and follows the
standard Node.js API format (as it can be checked in other similar
structures where 'length > 0' is preferred over 'length')

PR-URL: https://github.com/nodejs/node/pull/11733
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-04-05 18:36:09 -07:00
..
2017-03-17 11:09:10 -07:00
2017-03-10 11:23:48 -08:00
2017-03-24 15:25:49 -07:00
2017-03-10 11:23:48 -08:00
2016-10-04 12:17:32 -04:00
2017-03-17 11:09:40 -07:00
2017-03-10 11:23:48 -08:00
2017-03-31 22:02:25 +02:00
2017-03-26 12:40:24 +02:00
2017-03-10 11:23:48 -08:00