stretchr / objx

Go package for dealing with maps, slices, JSON and other data.
MIT License
695 stars 75 forks source link

accessors.go:Set speed improvement #12

Closed tylerstillwater closed 10 years ago

tylerstillwater commented 10 years ago

Currently we call the regex to extract the array number EVERY TIME. Regex is expensive, so we should do a simple string search to find if there is an open bracket in the string. If there is, do the regex.