From 94175536ff6d25df2c2c161296d104c10300eef0 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 15 Feb 2018 22:21:51 -0800 Subject: [PATCH] Remove special-case copy() for len < 1000 For https://github.com/feross/buffer/issues/174 --- index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/index.js b/index.js index 0e45b2a..7f67ccb 100644 --- a/index.js +++ b/index.js @@ -1497,11 +1497,6 @@ Buffer.prototype.copy = function copy (target, targetStart, start, end) { for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start] } - } else if (len < 1000) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } } else { Uint8Array.prototype.set.call( target, -- 2.34.1