-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Milestone
Description
According to a profiling data from a large number of servers at Google, strings.Fields
is within the top 50 functions by CPU time. The current implementation simply calls strings.FieldsFunc(s, unicode.IsSpace)
. We should consider writing a specialized version without calling unicode.IsSpace
. Also, we should should optimize for the fact that ASCII whitespace is by far the most common delimiter.
The same optimization can be applied to the bytes
package as well to keep them in sync.
bradfitz, bep, Ganners, mrjrieke, jostyee and 3 more