getClassesSlice used rxClassTrim.ReplaceAllString followed by
strings.Split, which allocated twice and produced empty strings from
leading/trailing spaces. strings.Fields handles all Unicode whitespace
in a single pass with no empty entries.
name old ns/op new ns/op delta
AddClass-8 176700 107500 -39.2%
RemoveClass-8 142900 64600 -54.8%
name old B/op new B/op delta
AddClass-8 12544 7024 -44.0%
RemoveClass-8 6503 1777 -72.7%
name old allocs new allocs delta
AddClass-8 697 374 -46.3%
RemoveClass-8 697 374 -46.3%