Here is a slow Swift expression that benefits from my binding inference improvements:

print(Array(1...5).filter { $0 < 3 }.map { $0 * 10 }.reduce(0, +))

It type checks in about a third of a second for me in a Swift 6.3. (It was 1 second in Swift 6.0!) With the PR I landed on main last night it’s now down to 2 milliseconds. Still way too slow—that unapplied + that’s passed to reduce() at the end misses out on an optimization. But that’s for next time.

(And yeah, constructing an Array from that Range is redundant, but without the extra set of overloads from that redundant call it doesn’t become difficult enough to trip up the older compiler)

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mathstodon.xyz/users/slava/statuses/116213902711153126 on your instance and quote it. (Note that quoting is not supported in Mastodon.)