-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve LongestRepeatingSequence performance by reducing alloca…
…tions (#575) Uses an optimization to keep only two arrays + other misc changes. Benchmarks: $ go test -bench=. -benchmem -memprofile=allocs goos: darwin goarch: amd64 pkg: github.com/projectdiscovery/utils/strings cpu: VirtualApple @ 2.50GHz BenchmarkLongestRepeatingSequence-10 171566 6612 ns/op 15584 B/op 61 allocs/op BenchmarkLongestRepeatingSequenceNew-10 360710 3129 ns/op 704 B/op 2 allocs/op +++ PASS ok github.com/projectdiscovery/utils/strings 1.851s
- Loading branch information
1 parent
3cb03c0
commit cebafa1
Showing
2 changed files
with
52 additions
and
27 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
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