Skip to content

Commit

Permalink
perf: use <<= 1 replace *=2 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyuanbuilds committed Aug 18, 2021
1 parent 0420632 commit ba45cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit ba45cbd

Please sign in to comment.