From c8b8f22a71e6837e3053c97199601e70cb22283e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=98=E6=9C=A8?= <1076849402@qq.com> Date: Tue, 9 Feb 2021 13:57:09 +0800 Subject: [PATCH] fix: use <<= 1 replace *=2 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f664cd7..c809f08 100644 --- a/index.js +++ b/index.js @@ -426,7 +426,7 @@ Denque.prototype._growArray = function _growArray() { // head is at 0 and array is now full, safe to extend this._tail = this._list.length; - this._list.length *= 2; + this._list.length <<= 1; this._capacityMask = (this._capacityMask << 1) | 1; };