From 67b2cbb4539a5da9bd4758aab7a488708b44a774 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 12:04:42 +0100 Subject: [PATCH] perf: make _occ Uint8Array (#176) --- 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