mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The deepHash() function gets called repeatedly as we descend the node tree, which results in O(n^2) behaviour because we're traversing entire node subtree from each node we try substitution in, in order to calculate the hash. Fix by adding a hash table for hashes, so that we can look up hashes we've already computed. This appears to yield a 26.8% saving in local tests. rdar://125739630
5.9 KiB
5.9 KiB