The expression of the day is an array literal whose elements are tuples of literals, for example this:

func f() {
let array = [
(0, 0, 0, 0), /* ... imagine this element repeated 100 times ... */
]
}

- Swift 6.0 took a leisurely 16 seconds to type check the body of f()
- Swift 6.2: 5 seconds
- Swift main: 2 seconds
- my latest tree: 15 milliseconds.

It's still doing too much work, but a 1000x improvement over Swift 6 isn't too shabby

@slava Is there a "I once understood how HM type inference works, but forgot" level explanation as to why that array takes so long to typecheck?