Files
next.orly.dev/pkg/utils/fastequal.go
mleku 110223fc4e Migrate internal module imports to unified package path.
Replaced legacy `*.orly` module imports with `next.orly.dev/pkg` paths across the codebase for consistency. Removed legacy `go.mod` files from sub-packages, consolidating dependency management. Added Dockerfiles and configurations for benchmarking environments.
2025-09-12 16:12:31 +01:00

18 lines
285 B
Go

package utils
import "next.orly.dev/pkg/utils/constraints"
func FastEqual[A constraints.Bytes, B constraints.Bytes](a A, b B) (same bool) {
if len(a) != len(b) {
return
}
ab := []byte(a)
bb := []byte(b)
for i, v := range ab {
if v != bb[i] {
return
}
}
return true
}