lang: Add unification optimizations

This adds a unification optimizations API, and uses it to optimize the
embedded provisioner. With these turned on, type unification drops from
around 1m45s to 2.5s which is a 40x speedup.
This commit is contained in:
James Shubin
2024-03-30 18:05:16 -04:00
parent ddf1be653e
commit 1b00af6926
6 changed files with 91 additions and 4 deletions

View File

@@ -242,6 +242,7 @@ func (obj *Lang) Init(ctx context.Context) error {
// apply type unification
logf := func(format string, v ...interface{}) {
// TODO: Remove the masked logger here when unification is clean!
if obj.Debug { // unification only has debug messages...
obj.Logf("unification: "+format, v...)
}