From 19fac0a8d50a830bbe25f03e83c94f67d2edc469 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sun, 26 Oct 2014 16:05:10 -0700 Subject: [PATCH] small perf improvement for `copy` --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 40d4ae0..bf25e09 100644 --- a/index.js +++ b/index.js @@ -837,7 +837,7 @@ Buffer.prototype.copy = function (target, target_start, start, end) { var len = end - start - if (len < 100 || !Buffer.TYPED_ARRAY_SUPPORT) { + if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < len; i++) { target[i + target_start] = this[i + start] } -- 2.34.1