From f5d6f73c95c0e890b1f4474e4ea4f974eacae355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 28 Nov 2024 11:50:39 +0100 Subject: [PATCH] perf: make _occ Uint8Array --- deps/streamsearch/sbmh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/streamsearch/sbmh.js b/deps/streamsearch/sbmh.js index b967365..888cc22 100644 --- a/deps/streamsearch/sbmh.js +++ b/deps/streamsearch/sbmh.js @@ -52,7 +52,7 @@ function SBMH (needle) { this.maxMatches = Infinity this.matches = 0 - this._occ = new Array(256) + this._occ = new Uint8Array(256) .fill(needleLength) // Initialize occurrence table. this._lookbehind_size = 0 this._needle = needle