-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use generators search through elements using lazy initialization
- Loading branch information
1 parent
8526d7a
commit 6b67456
Showing
1 changed file
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That new logic using a regexp might be faster if there are multiple keywords. But it's also less acurate as it's only checking whether the amount of matches is the same as the amount of input keywords.
I'll need to benchmark that. Migrating to the iterator and cached
JSON.stringify
was a big improvement already and might be enough for most setups.