Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize AttributeSelector ~= (whitspace separated contains)
strings.Fields unnecessarily allocates a slice - we just want to check a few substrings and can do without allocation. Found via $ go test -run=none -bench=Niklas -memprofile=memprof $ go tool pprof --web css.test memprof
- Loading branch information
Showing with 6 additions and 3 deletions.
- +6 −3 util.go