You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my tests on a ~400 kb dataset, the the mraleph's approach was barely faster than regexps, not several orders of magnitude as the graph in the README shows.
As for the jsperf test results, then that might be due to toReg and escapeRegExp. That should be done once, not on every iteration.
Edit: very odd. When the needle is english the regex doesn't perform well. My initial tests were with an Arabic needle.
Edit two: so regexes turned out to be quite close in performance, but it depends on the needle and query.
The text was updated successfully, but these errors were encountered:
From my tests on a ~400 kb dataset, the the mraleph's approach was barely faster than regexps, not several orders of magnitude as the graph in the README shows.
As for the jsperf test results, then that might be due to
toReg
andescapeRegExp
. That should be done once, not on every iteration.Edit: very odd. When the needle is english the regex doesn't perform well. My initial tests were with an Arabic needle.
Edit two: so regexes turned out to be quite close in performance, but it depends on the needle and query.
The text was updated successfully, but these errors were encountered: