glaslos / ssdeep

SSDEEP hash lib in Golang
Other
100 stars 35 forks source link

refactor: use bytes.Buffer for string concat #30

Closed wanglei-coder closed 2 years ago

wanglei-coder commented 2 years ago
goos: linux
goarch: amd64
pkg: breakingbad/cmd/ssdeep
cpu: Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
BenchmarkFuzzyFilename-6                     100          30882596 ns/op            4753 B/op         13 allocs/op
BenchmarkSSdeepFuzzyFilename-6               100          30961450 ns/op            7256 B/op        157 allocs/op

the same cost time, but use less memory.

glaslos commented 2 years ago

Thank you for your contribution!