zhenjl / xparse

Various parsing utilities, such as IP, time, and top-level-domain, in Go
http://godoc.org/github.com/surgebase/xparse
Apache License 2.0
24 stars 7 forks source link

Emit fsm code in chunks as opposed single func. #2

Open thanm opened 8 years ago

thanm commented 8 years ago

Changes genfsm.go to divide the state space into chunks of size 256, then call a helper for function for each chunk (as opposed to having a single giant function that does everything). This reduces the compile time for go1.7 down to something reasonable (15-30 seconds depending on machine speed). See related issues

https://github.com/zhenjl/xparse/issues/1 https://github.com/golang/go/issues/16407