myitcv / x

Mono-repo for all myitcv.io/... Go code
MIT License
103 stars 20 forks source link

cmd/gogenerate: experiment with a model whereby code generators are compiled in #173

Open myitcv opened 4 years ago

myitcv commented 4 years ago

One of the largest inefficiencies in code generation when run across multiple packages is that subsequent code generators repeat work done in prior code generators, for example resolving ASTs, type info, SSA form etc.

We should therefore experiment with a model whereby code generators are compiled into a single binary, and this information can be shared in memory.